-
Notifications
You must be signed in to change notification settings - Fork 498
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 inverted cfg attributes, like [not(macos)]
#1895
Comments
reposting #604 (comment): [@]casey are there any discussions on doing cargo style [not(windows)]
run:
cc main.c
./a.out
[windows]
run:
cl main.c
main.exe I imagine my usecase is quite common for some when dealing with doing/avoiding setup specific to CI environments: [env_var("CI") == "true"]
run:
./do_the_ci_setup.sh
./run.sh
[not(env_var("CI") == "true")]
run:
./run.sh |
This would be very useful. My use case is for shell detection: [env_var("SHELL") == "bash"]
tips:
@echo "Setup your shell like this:"
[env_var("SHELL") == "zsh"]
tips:
@echo "Setup your shell like this:" Although, for shell detection, it would be nice to have built-in attributes like we have for os detection, e.g. [bash]
tips:
@echo "Setup your shell like this:"
[zsh]
tips:
@echo "Setup your shell like this:"
[ps1]
tips:
Write-Host "Setup your shell like this:" With shell detection attributes, one could even have recipes per-shell. The current shell options set the global shell interpreter for the file, but with shell attributes, we can support multiple different shells in the same justfile. This can probably become its own feature request. Maybe this request is related to #531. |
No description provided.
The text was updated successfully, but these errors were encountered: