Reputation: 15
Github is supposed to say "Executable File"
in place of ** lines(** sloc)
after putting the shebang #!/usr/bin/env node
in. Instead it puts lines and SLOC. How can I make it say "Executable File"
?
Upvotes: 0
Views: 176
Reputation: 123473
The presence of a shebang in a script doesn't alone make the file "executable." It's just an instruction for how to execute the file when and if it is.
You'll need to change the file's mode to permit execution.
chmod +x {file}
git update-index --chmod=+x {file}
You can also review the file's mode with ls-files --stage
:
# before chmod
git ls-files --stage
100644 {commit} {length} {name}
# after chmod
git ls-files --stage
100755 {commit} {length} {name}
Upvotes: 2