Skip to content

Commit

Permalink
[core] Use the first positional argument after --args as the script f…
Browse files Browse the repository at this point in the history
…ilename to pipy
  • Loading branch information
pajama-coder committed May 19, 2024
1 parent bd7450a commit fa90ba1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main-options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,11 @@ void MainOptions::parse(const std::list<std::string> &args) {
if (term == "--pipy-options") {
end_of_options = false;
} else {
if (term[0] != '-' && filename.empty()) filename = term;
arguments.push_back(term);
if (term[0] != '-' && filename.empty()) {
filename = term;
} else {
arguments.push_back(term);
}
}
continue;
}
Expand Down

0 comments on commit fa90ba1

Please sign in to comment.