pnpm / cmd-shim

The cmd-shim used in pnpm
Other
14 stars 11 forks source link

Does cmdShim() support sh / batch (cmd) / pwsh script as src? #10

Open tats-u opened 5 years ago

tats-u commented 5 years ago

Related:

Yarn for Windows calls cmdShim() with the following src and to when yarn global add create-react-app is executed:

src to
[Yarn global folder]\node_modules\.bin\create-react-app (for sh) [prefix]\bin\create-react-app
[Yarn global folder]\node_modules\.bin\create-react-app.cmd [prefix]\bin\create-react-app.cmd
[Yarn global folder]\node_modules\.bin\create-react-app.ps1 [prefix]\bin\create-react-app.ps1

https://github.com/yarnpkg/yarn/blob/1af4c5f50c4c146a833c0c2b20d10be1f5a61803/src/cli/commands/global.js#L168 https://github.com/yarnpkg/yarn/blob/1af4c5f50c4c146a833c0c2b20d10be1f5a61803/src/cli/commands/global.js#L168

As the result, this module creates:

This issue was suppressed in Yarn until this module suppored PowerShell shims because the following code of Yarn, which replace create-react-app.cmd (junk sh script) with create-react-app.cmd.cmd: https://github.com/yarnpkg/yarn/blob/1af4c5f50c4c146a833c0c2b20d10be1f5a61803/src/cli/commands/global.js#L169-L171

Anyway, this module must:

tats-u commented 5 years ago

Why doesn't anyone reply? You don't mean to say that the problem of the competitive package manager makes no nevermind to you? Your reply is so late that even a wontfix label turned to be welcome.

zkochan commented 5 years ago

I am sorry. If someone would like to work on this, I will review/merge/publish. I don't have capacity for this at the moment.

zkochan commented 5 years ago

But it probably needs a review from a yarn maintainer because it is needed by yarn. I cannot take the responsibility of approving such changes without approval from official yarn maintainers

xieccc commented 5 years ago

Why doesn't anyone reply? You don't mean to say that the problem of the competitive package manager makes no nevermind to you? Your reply is so late that even a wontfix label turned to be welcome.

I am the reporter of issue 6913, thank you for finding a deeper problem. My ability is not enough to find such a deep place this time. I have been paying attention to it, and now someone has finally responded. Please do not get angry, I think there may be something in the yarn maintainer that causes them to not pay attention to this issue at this time.

tats-u commented 5 years ago

@zkochan Thank you for your reply. Yarn contributers found a previous version of cmd-shim create *.cmd (junk sh script shim to .cmd) and *.cmd.cmd, and added the makeshift https://github.com/yarnpkg/yarn/blob/1af4c5f50c4c146a833c0c2b20d10be1f5a61803/src/cli/commands/global.js#L169-L171. I wish the maintainers to understand the need of this change. I tried to create a PR but it was too difficult for me. Maybe I'll try again, or I wish someone created one on behalf of me.