Skip to content

Commit 40aed75

Browse files
author
Benjamin Pasero
committed
1 parent b9438bb commit 40aed75

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/main.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,14 @@ const args = parseCLIArgs();
3232
const userDataPath = getUserDataPath(args);
3333
app.setPath('userData', userDataPath);
3434

35+
// Set logs path before app 'ready' event if running portable
36+
// to ensure that no 'logs' folder is created on disk at a
37+
// location outside of the portable directory
38+
// (https://github.com/microsoft/vscode/issues/56651)
39+
if (portable.isPortable) {
40+
app.setAppLogsPath(path.join(userDataPath, 'logs'));
41+
}
42+
3543
// Update cwd based on environment and platform
3644
setCurrentWorkingDirectory();
3745

0 commit comments

Comments
 (0)