node-deb icon indicating copy to clipboard operation
node-deb copied to clipboard

Check that entrypoints are exectuable and have a shebang line

Open heartsucker opened this issue 8 years ago • 2 comments

heartsucker avatar Apr 23 '17 13:04 heartsucker

Why not use node followed by command line? Also this should be part of help.

#!/usr/bin/env node as first line of your code.

bogusfocused avatar Jul 11 '17 22:07 bogusfocused

Just having a shebang is insufficient. It needs to have the executable bit set. I'd have to check both of them, so a head -1 $entry | grep -E '^#!' and [[ -f $entry && -x $entry ]], and this would only work if someone didn't have a custom pre/post-inst stript that did anything silly.

heartsucker avatar Jul 12 '17 07:07 heartsucker