Running just commands (e.g just format) on Windows fails with the following errors:
1. error: recipe format could not be run because just could not find the shell sh: program not found
2. error: extraneous attributes ——▶ justfile:11:1 [group("Dart")]
By default, just looks for a POSIX shell (sh). Windows does not include this by default, which breaks the onboarding experience for Windows contributors even if Git Bash is installed.
Workaround
The following configuration currently works:
set unstable := true // Allows experimental features like [group(...)]
set windows-shell := ["powershell.exe", "-Command"] // Allows just to use PowerShell on Windows.
Proposed Solution
Update the Justfile to support windows-shell
Example:
set unstable := true
set shell := ["sh", "-c"]
set windows-shell := ["powershell.exe", "-Command"]
This improves the onboarding experience for Windows contributors and avoids requiring a separate POSIX shell installation such as Git Bash, MSYS2, or WSL.
Constrains: It requires testing on all OS
Running just commands (e.g
just format) on Windows fails with the following errors:1. error: recipe
formatcould not be run because just could not find the shellsh: program not found2. error: extraneous attributes ——▶ justfile:11:1 [group("Dart")]
By default,
justlooks for a POSIX shell (sh). Windows does not include this by default, which breaks the onboarding experience for Windows contributors even if Git Bash is installed.Workaround
The following configuration currently works:
set unstable := true // Allows experimental features like [group(...)]
set windows-shell := ["powershell.exe", "-Command"] // Allows just to use PowerShell on Windows.
Proposed Solution
Update the Justfile to support windows-shell
Example:
set unstable := true
set shell := ["sh", "-c"]
set windows-shell := ["powershell.exe", "-Command"]
This improves the onboarding experience for Windows contributors and avoids requiring a separate POSIX shell installation such as Git Bash, MSYS2, or WSL.
Constrains: It requires testing on all OS