GithubHelp home page GithubHelp logo

Comments (9)

Hofer-Julian avatar Hofer-Julian commented on September 6, 2024

Thanks for reporting.
Ideally, we wouldn't use bat scripts anymore mid-term, but until then I agree that we should run the deactivate script.

Would you be interested to open a PR for that?

from pixi.

alexweisberg avatar alexweisberg commented on September 6, 2024

Thanks for looking into it! I'm not familiar with the pixi code base so it may have to be someone else.

On a related note, I haven't checked, but are environment variables set/respected for global installed tools by default? Conda 4.9 and later supports setting these in the meta.yaml recipe variables section. I ask because I developed a conda package that sets and unsets a specific environment variable for the tool in the activate.d and deactivate.d scripts, but I may update it to use the recipe instead since that would be safer.

from pixi.

Hofer-Julian avatar Hofer-Julian commented on September 6, 2024

Good question, if don't do it yet, then we should start doing it.

from pixi.

baszalmstra avatar baszalmstra commented on September 6, 2024

Im not quite sure I understand because the tools also start a new shell, so any variables set only persist with the tools environment doesnt it?

from pixi.

baszalmstra avatar baszalmstra commented on September 6, 2024

Variables set in the recipes should be repected!

from pixi.

alexweisberg avatar alexweisberg commented on September 6, 2024

Great! and yes, in a new shell it does not matter. But I was thinking more for 'global' installed tools where it appears that a shell is not activated to run the program.

from pixi.

Hofer-Julian avatar Hofer-Julian commented on September 6, 2024

Great! and yes, in a new shell it does not matter. But I was thinking more for 'global' installed tools where it appears that a shell is not activated to run the program.

Could you give a small reproducer, where the environment is modified after running a binary installed by pixi global?

from pixi.

alexweisberg avatar alexweisberg commented on September 6, 2024

I just tested my example and because the activate scripts were run in a bash script, the environment changes don't persist after the script is finished running. So there is no need to run the deactivate.d scripts if the only things modified by them are environment variables. My apologies!

from pixi.

Hofer-Julian avatar Hofer-Julian commented on September 6, 2024

Thanks for confirming

from pixi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.