mirror of
https://github.com/NixOS/nix
synced 2025-06-28 01:11:15 +02:00
feat: break out of shebang processing for non-comments
This commit is contained in:
parent
01f61cefcb
commit
06f3583b1c
2 changed files with 12 additions and 11 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue