Skip to content

chore: add windows shell config for justfile#3

Closed
ptsouchlos wants to merge 1 commit intomainfrom
fix/justfile
Closed

chore: add windows shell config for justfile#3
ptsouchlos wants to merge 1 commit intomainfrom
fix/justfile

Conversation

@ptsouchlos
Copy link
Owner

First jj PR :)

Copilot AI review requested due to automatic review settings February 11, 2026 16:28
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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"]
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
set windows-shell := ["pwsh.exe", "-NoLogo", "-Command"]
set windows-shell := ["powershell.exe", "-NoLogo", "-Command"]

Copilot uses AI. Check for mistakes.
@ptsouchlos
Copy link
Owner Author

Why was copilot enabled??

@ptsouchlos ptsouchlos closed this Feb 11, 2026
@ptsouchlos ptsouchlos deleted the fix/justfile branch February 11, 2026 16:57
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.

2 participants