Skip to content

Commit 6ebaa27

Browse files
author
Benjamin Pasero
committed
💄 crash-reporter-directory
1 parent ace2f95 commit 6ebaa27

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/main.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,10 @@ app.setPath('userData', userDataPath);
3535
// Set temp directory based on crash-reporter-directory CLI argument
3636
// The crash reporter will store crashes in temp folder so we need
3737
// to change that location accordingly.
38-
const crashReporterDirectory = args['crash-reporter-directory'];
38+
let crashReporterDirectory = args['crash-reporter-directory'];
3939
if (crashReporterDirectory) {
40+
crashReporterDirectory = path.normalize(crashReporterDirectory);
41+
4042
if (!fs.existsSync(crashReporterDirectory)) {
4143
try {
4244
fs.mkdirSync(crashReporterDirectory);
@@ -45,6 +47,7 @@ if (crashReporterDirectory) {
4547
app.exit(1);
4648
}
4749
}
50+
console.log(`Found --crash-reporter-directory argument. Setting temp directory to be '${crashReporterDirectory}'`);
4851
app.setPath('temp', crashReporterDirectory);
4952
}
5053

0 commit comments

Comments
 (0)