Skip to content

Commit 6fbab1c

Browse files
committed
chore: do not return but exit via cli
1 parent d6a73f7 commit 6fbab1c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

bin/jsondiffpatch

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
#!/usr/bin/env node
22

3-
const jsondiffpatch = require('..');
3+
const diffpatch = require('..');
44

55
const fs = require('fs');
66

77
const fileLeft = process.argv[2];
88
const fileRight = process.argv[3];
99

1010
if (!fileLeft || !fileRight) {
11-
console.log('\n USAGE: jsondiffpatch left.json right.json');
12-
return;
11+
console.log('\n USAGE: diffpatch left.json right.json');
12+
process.exit(1);
1313
}
1414

1515
const left = JSON.parse(fs.readFileSync(fileLeft));
1616
const right = JSON.parse(fs.readFileSync(fileRight));
1717

18-
const delta = jsondiffpatch.diff(left, right);
19-
jsondiffpatch.console.log(delta);
18+
const delta = diffpatch.diff(left, right);
19+
diffpatch.console.log(delta);

0 commit comments

Comments
 (0)