Skip to content

Commit

Permalink
fix log path on Windows, log command executions
Browse files Browse the repository at this point in the history
  • Loading branch information
mbektas committed Oct 3, 2023
1 parent 370a7ef commit 532213b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
7 changes: 6 additions & 1 deletion src/main/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -457,13 +457,18 @@ export async function runCommandInEnvironment(
env: process.env
})
: spawn('bash', ['-c', commandScript], {
stdio: 'inherit',
env: {
...process.env,
BASH_SILENCE_DEPRECATION_WARNING: '1'
}
});

if (shell.stdout) {
shell.stdout.on('data', chunk => {
console.debug('>', Buffer.from(chunk).toString());
});
}

shell.on('close', code => {
if (code !== 0) {
console.error('Shell exit with code:', code);
Expand Down
5 changes: 1 addition & 4 deletions src/main/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -514,10 +514,7 @@ export function createUnsignScriptInEnv(envPath: string): string {
export function getLogFilePath(processType: 'main' | 'renderer' = 'main') {
switch (process.platform) {
case 'win32':
return path.join(
getUserDataDir(),
`\\jupyterlab-desktop\\logs\\${processType}.log`
);
return path.join(getUserDataDir(), `\\logs\\${processType}.log`);
case 'darwin':
return path.join(
getUserHomeDir(),
Expand Down

0 comments on commit 532213b

Please sign in to comment.