mirror of
https://github.com/Jeuners/ECC.git
synced 2026-09-09 15:02:30 +02:00
fix: respect home overrides in hook utilities
This commit is contained in:
parent
8bd5a7a5d9
commit
b10080c7dd
3 changed files with 49 additions and 0 deletions
|
|
@ -25,6 +25,10 @@ const WINDOWS_RESERVED_SESSION_IDS = new Set([
|
|||
* Get the user's home directory (cross-platform)
|
||||
*/
|
||||
function getHomeDir() {
|
||||
const explicitHome = process.env.HOME || process.env.USERPROFILE;
|
||||
if (explicitHome && explicitHome.trim().length > 0) {
|
||||
return path.resolve(explicitHome);
|
||||
}
|
||||
return os.homedir();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue