Conversation
There was a problem hiding this comment.
Pull request overview
This pull request adds Windows PowerShell support to the justfile, enabling cross-platform compatibility for the build tool configuration. The changes adapt shell commands to work on both Unix-like systems and Windows by using Just's os_family() function to conditionally execute platform-specific commands.
Changes:
- Added conditional logic for VERSION and COMMIT variables to support both Unix and Windows PowerShell syntax
- Configured Windows to use PowerShell Core (pwsh.exe) as the default shell
- Added missing documentation attribute to the install recipe for consistency
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| VERSION := if os_family() == "unix" { `git describe --tags --abbrev=0 2>/dev/null || echo "dev"` } else { `git describe --tags --abbrev=0 2>$null; if ($LASTEXITCODE -ne 0) { echo "dev" }` } | ||
| COMMIT := if os_family() == "unix" { `git rev-parse --short HEAD 2>/dev/null || echo "none"` } else { `git rev-parse --short HEAD 2>$null; if ($LASTEXITCODE -ne 0) { echo "none" }` } | ||
|
|
||
| set windows-shell := ["pwsh.exe", "-NoLogo", "-Command"] |
There was a problem hiding this comment.
The windows-shell setting uses pwsh.exe which requires PowerShell 7+ (PowerShell Core) to be installed. This is not installed by default on Windows (only Windows PowerShell 5.1 is). Consider documenting this requirement in the README's installation section, or consider using powershell.exe for broader compatibility with Windows systems.
| set windows-shell := ["pwsh.exe", "-NoLogo", "-Command"] | |
| set windows-shell := ["powershell.exe", "-NoLogo", "-Command"] |
|
Why was copilot enabled?? |
First
jjPR :)