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

Allow to select shell in command line for token replacement. #2077

Merged
merged 1 commit into from
Mar 15, 2024

Conversation

Jarod42
Copy link
Contributor

@Jarod42 Jarod42 commented May 9, 2023

What does this PR do?

Allow to select shell type to use for command substitution.
We can use posix shell on windows

How does this PR change Premake's behavior?

Token command substitution uses shell before os.target()

Anything else we should know?

Needed for testing repository to run ninja with msc under windows run from bash shell.

Did you check all the boxes?

  • Focus on a single fix or feature; remove any unrelated formatting or code changes
  • Add unit tests showing fix or feature works; all tests pass
  • Mention any related issues (put closes #XXXX in comment to auto-close issue when PR is merged)
  • Follow our coding conventions
  • Minimize the number of commits
  • Align documentation to your changes

@KyrietS
Copy link
Member

KyrietS commented Mar 14, 2024

When would you need an --os=windows with --shell=posix or vice versa?

@Jarod42
Copy link
Contributor Author

Jarod42 commented Mar 14, 2024

My use case is --os=windows, when not using cmd prompt, so with mingw/msys.
I have test cases for ninja/gmake2 in my testing repo (https://github.com/Jarod42/premake-sample-projects/actions/runs/8222529226 and https://github.com/Jarod42/premake-sample-projects/actions/runs/8224334172/job/22488026238) respectively (gmake2 has currently other issues...)
codelite/codeblocks might also be concerned.

Copy link
Member

@KyrietS KyrietS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aight, looks good 👍 I've never used msys myself but this change might be helpful

Copy link
Member

@nickclark2016 nickclark2016 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nickclark2016 nickclark2016 merged commit b4d65e3 into premake:master Mar 15, 2024
14 checks passed
@Jarod42 Jarod42 deleted the shell-commandline branch March 16, 2024 13:52
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.

3 participants