Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

execute-local should be parsed to run with resolveCommand in yarn@v1 #31

Open
5 of 7 tasks
wtto00 opened this issue Nov 21, 2024 · 0 comments
Open
5 of 7 tasks

Comments

@wtto00
Copy link

wtto00 commented Nov 21, 2024

Describe the bug

const pm = detectSync()
const commands = resolveCommand(pm.agent, 'execute-local', ['tsx', 'a.ts'])
console.log(commands)

In yarn@v1, yarn exec tsx a.ts will trigger an error: error Couldn't find the binary tsx.

yarn run tsx a.ts works well.

But in yarn@v4, yarn exec tsx a.ts works well.

Reproduction

https://github.com/wtto00/package-manager-detector-issue

System Info

System:
    OS: Windows 11 10.0.22631
    CPU: (6) x64 Intel(R) Core(TM) i5-9600K CPU @ 3.70GHz
    Memory: 7.49 GB / 31.93 GB
  Binaries:
    Node: 20.13.1 - ~\AppData\Local\fnm_multishells\5648_1732206250823\node.EXE
    Yarn: 1.22.21 - ~\AppData\Local\fnm_multishells\5648_1732206250823\yarn.CMD
    npm: 10.8.1 - ~\AppData\Local\fnm_multishells\5648_1732206250823\npm.CMD
  Browsers:
    Edge: Chromium (128.0.2739.79)
    Internet Explorer: 11.0.22621.3527

Used Package Manager

yarn

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Contributions

  • I am willing to submit a PR to fix this issue
  • I am willing to submit a PR with failing tests (actually just go ahead and do it, thanks!)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant