Skip to content

Support seamless cross-platform Justfile execution across Windows #97

Description

@MusabYK

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions