# acp: Fix npm version spec breaking on Windows \(\#55938\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/a4005b6d99aaa96458ec7cafd786e6e747a56b5a)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: a4005b6d99aaa96458ec7cafd786e6e747a56b5a

Requested commit: a4005b6d99aaa96458ec7cafd786e6e747a56b5a

Commit: a4005b6d99aaa96458ec7cafd786e6e747a56b5a

Tree: 3f8a11dfb4fd4cd796a9a887994bafdc53e00de9

Author: Agus Zubiaga

Committer: GitHub

## Message

```
acp: Fix npm version spec breaking on Windows (#55938)

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

#55770 changed the npm package version spec to `package@<=1.2.3`. On
Windows this fails with `The system cannot find the file specified.`
because:

- `npm` resolves to `npm.cmd`, a batch file. Windows runs `.cmd` files
via cmd.exe, which parses the invocation and treats unquoted `<` as
input redirection.
- The single quotes our shell builder emits around args are PowerShell
string-literal syntax that PS strips during parsing. PS only re-adds
CRT-style transport quotes around native command args containing
whitespace, so `package@<=0.25.3` reaches `npm.cmd` bare and cmd.exe
fails before the batch body even runs.

Switch to npm's hyphen-range syntax (`0.0.0 - <version>`, equivalent to
`<=<version>`), which has no `<`.

Closes #55921

Release Notes:

- Fixed ACP agents failing to launch on Windows with "The system cannot
find the file specified"
```

## Parents

- [0e479e0e312c2513f75eb8dfc77bf3bb72ee2c91](https://git.cafe/gitcafe/zed/commit/0e479e0e312c2513f75eb8dfc77bf3bb72ee2c91?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/a4005b6d99aaa96458ec7cafd786e6e747a56b5a?format=markdown)
