Skip to content

Windows PowerShell: @ symbol in drone commands needs quoting — @branch parsed as PS array #315

@Input-X

Description

@Input-X

Bug

PowerShell treats @ as a special character (array/splatting operator). Running:

drone @prax monitor run

PowerShell interprets @prax as a variable reference, not a literal string. Drone receives monitor as the first arg instead of @prax.

Error: drone: unknown command 'monitor'

Workaround

Quote the argument:

drone '@prax' monitor run

Fix options

  1. Document in README/setup output — tell Windows users to quote @branch args in PowerShell
  2. Create a drone.ps1 wrapper — auto-detect and fix @ args before passing to the real drone
  3. Accept prax without @ prefix — drone could treat drone prax monitor run as equivalent to drone @prax monitor run

Option 3 is probably best UX. Option 1 is simplest.

Not affected

  • Git Bash on Windows (works fine)
  • Linux/macOS bash/zsh (works fine)
  • Only PowerShell has this issue

Found during Windows 10 setup testing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions