1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-28 13:41:15 +02:00

feat: break out of shebang processing for non-comments

This commit is contained in:
Tom Bereknyei 2022-11-26 09:06:39 -05:00 committed by tomberek
parent 01f61cefcb
commit 06f3583b1c
2 changed files with 12 additions and 11 deletions

View file

@ -121,7 +121,8 @@ void Args::parseCmdline(const std::string & programName, const Strings & _cmdlin
std::string line;
std::getline(stream,line);
while (std::getline(stream,line) && !line.empty()){
std::string commentChars("#/\\%@*-");
while (std::getline(stream,line) && !line.empty() && commentChars.find(line[0]) != std::string::npos){
line = chomp(line);
std::smatch match;