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

Add the input for Node.js Support #674

Open
suzuki-shunsuke opened this issue Aug 24, 2024 · 0 comments
Open

Add the input for Node.js Support #674

suzuki-shunsuke opened this issue Aug 24, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@suzuki-shunsuke
Copy link
Member

suzuki-shunsuke commented Aug 24, 2024

https://aquaproj.github.io/docs/reference/nodejs-support/

To execute tools installed by npm i -g, you need to set npm's preset config and the environment variable $PATH.
This issue proposes to add the input to set them in aqua-installer action.

e.g.

- uses: aquaproj/[email protected]
  with:
    aqua_version: v2.30.0
    enable_nodejs: 'true'
export NPM_CONFIG_PREFIX="${XDG_DATA_HOME:-$HOME/.local/share}/npm-global" # You can change the path freely
export PATH=$NPM_CONFIG_PREFIX/bin:$PATH

Of course, you can configure them without this feature, but this feature is user friendly.

Workaround

- run: |
    echo NPM_CONFIG_PREFIX="${XDG_DATA_HOME:-$HOME/.local/share}/npm-global" >> "$GITHUB_ENV"
    echo "$NPM_CONFIG_PREFIX/bin" >> "$GITHUB_PATH"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant