Closed mkobit closed 8 years ago
I am using this hytojson.py as a command line script. When I attempt to run it with a file that is missing, it returns a 0 error code with the output `
hytojson.py
0
hdf5-json/util# python h5tojson.py hello Cannot find file: hello hdf5-json/util# echo $? 0
This does not follow the same sort of pattern that other command line utilities follow.
hdf5-json/util# echo $? 2 hdf5-json/util# cat notafile cat: notafile: No such file or directory hdf5-json/util# echo $? 1
I think that if the script can not find the file, it should not return a 0 status code. Thoughts?
Makes sense - I'll update the scripts to return 1 on failure.
Ok - this was a small update. Fixed in commit: 75222e41b03a1deddab7d1fd7a4b1d85c89cb08e.
Awesome. Thanks for the change!
I am using this
hytojson.py
as a command line script. When I attempt to run it with a file that is missing, it returns a0
error code with the output `This does not follow the same sort of pattern that other command line utilities follow.
I think that if the script can not find the file, it should not return a
0
status code. Thoughts?