Skip to content

Commit df34d39

Browse files
committed
fix: correct base path in error message
fix #29, close #54
1 parent 35e639e commit df34d39

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/path.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ function getDirectoryName(filePath: string): string {
2020
}
2121

2222
/**
23-
* Base dir: {VSCodeExecPath}/out
23+
* Base dir for all modified file
24+
*
25+
* The `product.json` is in its parent dir
2426
*/
2527
export const baseDir = (() => {
2628
const envAppRoot = env.appRoot

src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export async function runAndRestart(message: string, fullRestart: boolean, actio
6363
logError(`${base} it runs on read-only filesystem. Maybe you need to choose another way to install VSCode`, err)
6464
return
6565
} else if (err.message.includes('Maximum call stack size exceeded')) {
66-
logError(`${base} current user is not allowed. Please run "sudo chown -R $(whoami) '${baseDir}'" to grant permissions`, err)
66+
logError(`${base} current user is not allowed. Please run "sudo chown -R $(whoami) '${path.dirname(baseDir)}'" to grant permissions`, err)
6767
return
6868
}
6969
}

0 commit comments

Comments
 (0)