Moses Grant
Moses Grant

Reputation: 15

"Executable File" for node.js in Github

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

Answers (1)

Jonathan Lonowski
Jonathan Lonowski

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.

On Linux/Unix:

chmod +x {file}

On Windows:

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

Related Questions