mirror of
https://github.com/NixOS/nix
synced 2025-07-06 21:41:48 +02:00
Merge pull request #10337 from Cyclic4179/patch-1
`nix shell` shebang: support O'Caml comments
This commit is contained in:
commit
ef26133df3
2 changed files with 20 additions and 1 deletions
|
@ -285,7 +285,7 @@ void RootArgs::parseCmdline(const Strings & _cmdline, bool allowShebang)
|
|||
|
||||
std::string line;
|
||||
std::getline(stream,line);
|
||||
static const std::string commentChars("#/\\%@*-");
|
||||
static const std::string commentChars("#/\\%@*-(");
|
||||
std::string shebangContent;
|
||||
while (std::getline(stream,line) && !line.empty() && commentChars.find(line[0]) != std::string::npos){
|
||||
line = chomp(line);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue