trigger.dev icon indicating copy to clipboard operation
trigger.dev copied to clipboard

bug: CLI Init Commands don't Work OOTB in PowerShell

Open erin-allison opened this issue 1 year ago • 3 comments

Provide environment information

System:

  • OS: Windows 11 10.0.22621
  • CPU: (16) x64 AMD Ryzen 7 7800X3D 8-Core Processor
  • Memory: 27.07 GB / 63.15 GB

Binaries:

  • Node: 18.19.0 - C:\Program Files\nodejs\node.EXE
  • npm: 10.2.3 - C:\Program Files\nodejs\npm.CMD
  • pnpm: 8.15.1 - ~\AppData\Roaming\npm\pnpm.CMD

Describe the bug

In PowerShell, a token beginning with the '@' character is used for splatting, and is invalid for use when calling a standard executable.

For a (trivially) better DX, the package name in that command should be enclosed in quotes so that the command doesn't need to be edited before execution in PowerShell.

image

image

Reproduction repo

n/a

To reproduce

  1. Go to Framework Setup and select a framework
  2. Copy and paste the "Run the CLI 'init' command..." step into a PowerShell window

Additional information

No response

erin-allison avatar Feb 01 '24 19:02 erin-allison

This is a good note 👍

For v3 the CLI will be called just trigger.dev. Will that work ok with Powershell @erin-allison? I assume dots are ok? Otherwise we could call it triggerdotdev.

matt-aitken avatar Feb 01 '24 20:02 matt-aitken

Yes, dots are okay, and "@" signs in the middle of a string are fine, just not as the first character of a token.

erin-allison avatar Feb 01 '24 20:02 erin-allison

Thanks! We didn't realise this until our first Powershell user started the CLI. It explains why CLIs are never namespaced packages on npm.

matt-aitken avatar Feb 02 '24 09:02 matt-aitken