Skip to content

Commit

Permalink
Normlise the default project root too
Browse files Browse the repository at this point in the history
  • Loading branch information
imjoehaines committed May 7, 2021
1 parent e1504e0 commit 59f078d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/electron/src/config/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const stringWithLength = require('@bugsnag/core/lib/validators/string-with-lengt
const listOfFunctions = require('@bugsnag/core/lib/validators/list-of-functions')
const { inspect } = require('util')
const { app } = require('electron')
const normalizePath = require('@bugsnag/core/lib/path-normalizer')

module.exports.schema = {
...schema,
Expand Down Expand Up @@ -30,7 +31,7 @@ module.exports.schema = {
validate: value => typeof value === 'function'
},
projectRoot: {
defaultValue: () => app.getAppPath(),
defaultValue: () => normalizePath(app.getAppPath()),
validate: value => value === null || stringWithLength(value),
message: 'should be string'
},
Expand Down

0 comments on commit 59f078d

Please sign in to comment.