Skip to content

Fix argument parsing: Properly handle -- to separate files and script arguments#90

Merged
aatxe merged 2 commits intoluau-lang:primaryfrom
unfetchable:script-arguments-fix
Feb 26, 2025
Merged

Fix argument parsing: Properly handle -- to separate files and script arguments#90
aatxe merged 2 commits intoluau-lang:primaryfrom
unfetchable:script-arguments-fix

Conversation

@unfetchable
Copy link
Copy Markdown
Contributor

Previously, lute treated arguments after -- as files instead of script arguments. This caused errors like:

Error opening ./1  
Error opening ./2  
Error opening ./3  

since 1 2 3 were misinterpreted as file paths.

This PR does the following:

  • Ensures -- properly marks the transition between files and arguments.
  • Converts argv[i] from char* to std::string before pushing it into files. (Misc)

Closes #86

unfetchable added 2 commits February 26, 2025 15:48
Compatibility with CMake < 3.5 has been removed from CMake.
@aatxe aatxe merged commit 1ebb120 into luau-lang:primary Feb 26, 2025
3 checks passed
@aatxe
Copy link
Copy Markdown
Member

aatxe commented Feb 26, 2025

Thanks!

@unfetchable unfetchable deleted the script-arguments-fix branch February 27, 2025 00:36
green-real pushed a commit to green-real/lute that referenced this pull request May 19, 2025
…pt arguments (luau-lang#90)

Previously, lute treated arguments after -- as files instead of script
arguments. This caused errors like:
```sh
Error opening ./1  
Error opening ./2  
Error opening ./3  
``` 
since ```1 2 3``` were misinterpreted as file paths.

This PR does the following:
- Ensures -- properly marks the transition between files and arguments.
- Converts argv[i] from char* to std::string before pushing it into
files. (Misc)

Closes luau-lang#86
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CLI tries to read program args as files to execute

2 participants