Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
&引用;“可执行文件”;对于Github中的node.js_Node.js_Github_Shebang - Fatal编程技术网

&引用;“可执行文件”;对于Github中的node.js

&引用;“可执行文件”;对于Github中的node.js,node.js,github,shebang,Node.js,Github,Shebang,Github应该说“可执行文件”,而不是**行(**sloc) 放了shebang#之后/中的usr/bin/env节点。相反,它把行和SLOC放在一起。我怎样才能让它说“可执行文件”?脚本中存在一个并不仅仅使文件成为“可执行文件”。它只是一个说明如何在文件被执行时执行文件的指令 您需要更改文件的模式以允许执行 : : 您还可以使用ls files--stage查看文件的模式: # before chmod git ls-files --stage 100644 {commit} {lengt

Github应该说
“可执行文件”
,而不是
**行(**sloc)
放了shebang
#之后/中的usr/bin/env节点
。相反,它把行和SLOC放在一起。我怎样才能让它说“可执行文件”?

脚本中存在一个并不仅仅使文件成为“可执行文件”。它只是一个说明如何在文件被执行时执行文件的指令

您需要更改文件的模式以允许执行

:

:


您还可以使用
ls files--stage查看文件的模式:

# before chmod
git ls-files --stage
100644 {commit} {length} {name}

# after chmod
git ls-files --stage
100755 {commit} {length} {name}
git update-index --chmod=+x {file}
# before chmod
git ls-files --stage
100644 {commit} {length} {name}

# after chmod
git ls-files --stage
100755 {commit} {length} {name}