File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -8,10 +8,10 @@ import { getPath } from './utils'
8
8
const { BrowserWindow } = remote || electron
9
9
10
10
let IDMap = { }
11
- const IDMapPath = path . resolve ( getPath ( ) , 'IDMap.json' )
12
- if ( fs . existsSync ( IDMapPath ) ) {
11
+ const getIDMapPath = ( ) => path . resolve ( getPath ( ) , 'IDMap.json' )
12
+ if ( fs . existsSync ( getIDMapPath ( ) ) ) {
13
13
try {
14
- IDMap = JSON . parse ( fs . readFileSync ( IDMapPath , 'utf8' ) )
14
+ IDMap = JSON . parse ( fs . readFileSync ( getIDMapPath ( ) , 'utf8' ) )
15
15
} catch ( err ) {
16
16
console . error (
17
17
'electron-devtools-installer: Invalid JSON present in the IDMap file'
@@ -38,7 +38,7 @@ const install = (forceDownload = false) => {
38
38
}
39
39
const name = BrowserWindow . addDevToolsExtension ( extensionFolder ) // eslint-disable-line
40
40
fs . writeFileSync (
41
- IDMapPath ,
41
+ getIDMapPath ( ) ,
42
42
JSON . stringify (
43
43
Object . assign ( IDMap , {
44
44
[ chromeStoreID ] : name
You can’t perform that action at this time.
0 commit comments