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

Install global bin to the correct location on windows #5

Conversation

sounisi5011
Copy link
Collaborator

On Windows, the globally installed CLI is placed in the %npm_config_prefix% directory, not the %npm_config_prefix%\bin directory.

When in global mode, executables are linked into {prefix}/bin on Unix,
or directly into {prefix} on Windows. Ensure that path is in your
terminal's PATH environment to run them.
--- https://github.com/npm/cli/blob/1e977eec223463b04a6ad2c1953e31a6d5d22f2c/docs/lib/content/configuring-npm/folders.md?plain=1#L55-L57

This pull request fixes a bug that did not conform to this behavior.

  • Fix bugs
  • Add tests for behavior changes

Closes #4

On Windows, the globally installed CLI is placed in the `%npm_config_prefix%` directory, not the `%npm_config_prefix%\bin` directory.

> When in global mode, executables are linked into `{prefix}/bin` on Unix,
> or directly into `{prefix}` on Windows.  Ensure that path is in your
> terminal's `PATH` environment to run them.
> --- https://github.com/npm/cli/blob/1e977eec223463b04a6ad2c1953e31a6d5d22f2c/docs/lib/content/configuring-npm/folders.md?plain=1#L55-L57

This pull request fixes a bug that did not conform to this behavior.

Closes go-task#4
@sounisi5011
Copy link
Collaborator Author

sounisi5011 commented May 24, 2023

Note
I am not a native English speaker, so I am using the DeepL translator (DeepL Pro) for all English text included in this pull request.

DeepL Pro should have no licensing issues 1, but please check all the English text included (comments in the code, and the commit text when merging) before merging.
Maybe the English text contains some mistakes.

If you feel that adding machine-translated text to this repository is undesirable, feel free to close this pull request and create a new one.
I do not take this as an insult.

Footnotes

  1. The problem with using machine translation in OSS is that the translation results may be limited to private use. If the copyright of the translation results belongs to the company providing the machine translation, the user's inclusion of the translation in the OSS may exceed the scope of private use and violate the terms of use of the machine translation and the license of the OSS.

    For example, in the Ubuntu translation project, one person used Google Translate to translate into Japanese, which became a big problem because it violated the Ubuntu license.

    In Wikimedia's opinion, the likelihood of copyright infringement from the use of Google Translate on Wikipedia is "very unlikely".

    In the case of DeepL Pro, the copyright of the translation result belongs to the user.

    7.5 DeepL does not assume any copyrights to the translations made by Customer using the Products. In the event that the translations made by Customer using the Products are deemed to be protected under copyright laws to the benefit of DeepL, DeepL grants to Customer, upon creation of such translations, all exclusive, transferable, sublicensable, worldwide perpetual rights to use the translations without limitation and for any existing or future types of use, including without limitation the right to modify the translations and to create derivative works.
    --- DeepL Terms and Conditions

    Therefore, this problem should not exist.

    However, if you think it is necessary, please rewrite the English text.

@andreynering
Copy link
Member

Thanks @sounisi5011!

@andreynering andreynering merged commit 773f52e into go-task:master May 28, 2023
andreynering added a commit that referenced this pull request May 28, 2023
@sounisi5011 sounisi5011 deleted the fix-issue-4/install-global-bin-to-the-correct-location-on-windows branch May 28, 2023 22:03
sounisi5011 added a commit to sounisi5011/package-version-git-tag that referenced this pull request May 28, 2023
`@go-task/cli` with `@go-task/go-npm` is now installed in the correct location on Windows.
see go-task/go-npm#5
sounisi5011 added a commit to sounisi5011/package-version-git-tag that referenced this pull request Jul 2, 2023
The `@go-task/go-npm` included in `@go-task/cli` now installs the `task` command in the correct location on Windows!
see go-task/go-npm#5, go-task/go-npm#8, and go-task/go-npm#9

This reverts commit abb45e1
sounisi5011 added a commit to sounisi5011/package-version-git-tag that referenced this pull request Jul 2, 2023
* ⬆️ Update dependency @go-task/cli to v3.27.1 ( 77618ab )

* 🔥 Remove patches for `@go-task/go-npm` package ( d626085 )

    The `@go-task/go-npm` included in `@go-task/cli` now installs the `task` command in the correct location on Windows!
    see go-task/go-npm#5, go-task/go-npm#8, and go-task/go-npm#9

    This reverts commit abb45e1

* ⬆️ Update `pnpm-lock.yaml` ( 36c5f37 )

* 📝 Update CHANGELOG ( 766d804 )

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Sonishi Izuka <sounisi5011@users.noreply.github.com>
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

Successfully merging this pull request may close these issues.

BUG: On Windows, binaries are installed in the wrong location
2 participants