Try catch the file opening
Closed this issue · 1 comments
joereynolds commented
Otherwise you get this
: mort -f dfgd
fs.js:646
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^
Error: ENOENT: no such file or directory, open 'dfgd'
at Object.fs.openSync (fs.js:646:18)
at Object.fs.readFileSync (fs.js:551:33)
at Selectors.fromFile (/home/joe/programs/mort/dist/src/selectors.js:8:33)
at RipGrep.run (/home/joe/programs/mort/dist/src/grep-programs/ripgrep.js:8:58)
at Object.<anonymous> (/home/joe/programs/mort/dist/src/main.js:50:17)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
~/programs/mort (master)
:
Maybe just output
mort couldn't open this file, are you sure the name or path is correct?
joereynolds commented