-
https://github.com/sagiegurari/cargo-make?tab=readme-ov-file#platform-override Similar to cargo-make's platform overrides. Wherein, I would run a different command on windows and a different one in linux or mac? |
Beta Was this translation helpful? Give feedback.
Answered by
aboisvert
Jan 18, 2025
Replies: 2 comments
-
Found a way after reading how shebangs work here. My thought was that since This works quite well! # Simple OS-specific command
list:
#!/usr/bin/env sh
if [ "{{os()}}" = "windows" ]; then
echo "Listing on Windows"
dir
else
echo "Listing on Unix"
ls -l
fi |
Beta Was this translation helpful? Give feedback.
0 replies
-
You can use attributes to enable tasks for specific operating systems: [windows]
task1:
dir
[linux]
task1:
ls
[macos]
task1:
ls |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
casey
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can use attributes to enable tasks for specific operating systems:
See https://just.systems/man/en/print.html#attributes