File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -99,9 +99,9 @@ module.exports = (er, npm) => {
99
99
100
100
case 'EJSONPARSE' :
101
101
// Check whether we ran into a conflict in our own package.json
102
- if ( er . file === resolve ( npm . prefix , 'package.json' ) ) {
102
+ if ( er . path === resolve ( npm . prefix , 'package.json' ) ) {
103
103
const { isDiff } = require ( 'parse-conflict-json' )
104
- const txt = require ( 'fs' ) . readFileSync ( er . file , 'utf8' )
104
+ const txt = require ( 'fs' ) . readFileSync ( er . path , 'utf8' )
105
105
. replace ( / \r \n / g, '\n' )
106
106
if ( isDiff ( txt ) ) {
107
107
detail . push ( [
Original file line number Diff line number Diff line change @@ -292,7 +292,7 @@ t.test('json parse', t => {
292
292
process . argv = [ 'arg' , 'v' ]
293
293
t . matchSnapshot ( errorMessage ( Object . assign ( new Error ( 'conflicted' ) , {
294
294
code : 'EJSONPARSE' ,
295
- file : resolve ( dir , 'package.json' ) ,
295
+ path : resolve ( dir , 'package.json' ) ,
296
296
} ) , npm ) )
297
297
t . end ( )
298
298
} )
@@ -314,7 +314,7 @@ t.test('json parse', t => {
314
314
process . argv = [ 'arg' , 'v' ]
315
315
t . matchSnapshot ( errorMessage ( Object . assign ( new Error ( 'not json' ) , {
316
316
code : 'EJSONPARSE' ,
317
- file : resolve ( dir , 'package.json' ) ,
317
+ path : resolve ( dir , 'package.json' ) ,
318
318
} ) , npm ) )
319
319
t . end ( )
320
320
} )
@@ -330,7 +330,7 @@ t.test('json parse', t => {
330
330
process . argv = [ 'arg' , 'v' ]
331
331
t . matchSnapshot ( errorMessage ( Object . assign ( new Error ( 'not json' ) , {
332
332
code : 'EJSONPARSE' ,
333
- file : `${ dir } /blerg.json` ,
333
+ path : `${ dir } /blerg.json` ,
334
334
} ) , npm ) )
335
335
t . end ( )
336
336
} )
You can’t perform that action at this time.
0 commit comments