Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The -o flag should not strip extensions except for .exe #306

Merged

Conversation

mkilgore
Copy link
Contributor

@mkilgore mkilgore commented Feb 7, 2023

Current the -o flag will strip any "extension" on the provided filename, which is fairly problimatic on Linux and Mac OS since those executables do not have other extensions and names like "foobar.v1" will get the ".v1" stripped off. This can happen on Windows as well if you leave off the .exe (QB64-PE will add it for you, but also strip off the existing extension if there was one).

QB64-PE stripping off the ".exe" when provided that on Linux and Mac OS might actually be useful behavior people are relying on (so that they don't need to provide different names when compiling on Linux/Mac OS) so we are preserving that behavior and still removing the extension if it is exactly "EXE", otherwise we now leave it in place.

Fixes: #297

@mkilgore mkilgore added the bug Something isn't working label Feb 7, 2023
Current the -o flag will strip any "extension" on the provided filename,
which is fairly problimatic on Linux and Mac OS since those executes do
not have other extensions and names like "foobar.v1" will get the ".v1"
stripped off. This can happen on Windows as well if you leave off the
.exe (QB64-PE will add it for you, but also strip off the existing
extension).

QB64-PE stripping off the ".exe" when provided that on Linux and Mac OS
might actually be useful behavior people are relying on (so that they
don't need to provide different names when compiling on Linux/Mac OS) so
we are preserving that and still removing the extension if it is exactly
"EXE", otherwise we now leave it in place.

Fixes: QB64-Phoenix-Edition#297
@mkilgore mkilgore merged commit 2fe0dd3 into QB64-Phoenix-Edition:main Feb 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The -o flag will incorrectly strip the provided extension if it is not .exe
4 participants