This commit is contained in:
AJ ONeal 2017-09-25 12:22:44 -06:00
parent be4cfac1af
commit b274295e90
2 changed files with 3 additions and 1 deletions

View File

@ -7,6 +7,7 @@ var fs = require('fs');
if (!fsname || '--help' === fs || '-h' === fs) { if (!fsname || '--help' === fs || '-h' === fs) {
console.error('Usage: hexdump.js <filepath>'); console.error('Usage: hexdump.js <filepath>');
process.exit(2);
return; return;
} }
@ -14,6 +15,7 @@ try {
fs.statSync(fsname); fs.statSync(fsname);
} catch(e) { } catch(e) {
console.error(e.message); console.error(e.message);
process.exit(3);
return; return;
} }

View File

@ -4,7 +4,7 @@
"description": "Like hexdump on *nix, but in JavaScript.", "description": "Like hexdump on *nix, but in JavaScript.",
"main": "hexdump.js", "main": "hexdump.js",
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1" "test": "node bin/cli.js hexdump.js"
}, },
"repository": { "repository": {
"type": "git", "type": "git",