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

Env var not passed down the nix develop command #149

Closed
soywod opened this issue Dec 13, 2022 · 4 comments · Fixed by #178
Closed

Env var not passed down the nix develop command #149

soywod opened this issue Dec 13, 2022 · 4 comments · Fixed by #178
Labels
documentation Improvements or additions to documentation

Comments

@soywod
Copy link

soywod commented Dec 13, 2022

I have a step that publishes my node lib to NPM:

      - name: Publishes the lib
        working-directory: lib
        run: nix develop -c yarn publish --access public
        env:
          NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

This command fails because yarn publish cannot find the NODE_AUTH_TOKEN env var. If I remove the nix develop -c it works as expected, but I would prefer using the node version packed with nix. Any idea on how to deal with this?

@Alizter
Copy link

Alizter commented Feb 23, 2023

Does passing -k NODE_AUTH_TOKEN to nix develop fix it?

@l0b0
Copy link
Contributor

l0b0 commented Mar 8, 2023

Is this a cachix issue? Could this be closed?

@Alizter
Copy link

Alizter commented Mar 8, 2023

Maybe with some documentation about the issue it can be closed.

@sandydoo
Copy link
Member

Does --keep / -k work with nix develop? It requires adding the --ignore-environment flag, which then completely breaks the shell for me.

nix develop --impure definitely works though.

@sandydoo sandydoo added the documentation Improvements or additions to documentation label Apr 28, 2023
sandydoo added a commit that referenced this issue May 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants