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

The Run Cell button does not load User profiles (e.g. ~/.bashrc) after the recent update. #1693

Open
forseti opened this issue Sep 26, 2024 · 3 comments

Comments

@forseti
Copy link

forseti commented Sep 26, 2024

Hi Team

The Run Cell button does not seem to load .bashrc after the recent update.
Is there anyway to load User profiles or any custom/external ENV vars for each run?

Thanks!

@forseti forseti changed the title The Run Cell button does not load .bashrc after the recent update. The Run Cell button does not load User profiles (e.g. .bashrc) after the recent update. Sep 26, 2024
@forseti forseti changed the title The Run Cell button does not load User profiles (e.g. .bashrc) after the recent update. The Run Cell button does not load User profiles (e.g. .bashrc) after the recent update. Sep 26, 2024
@forseti forseti changed the title The Run Cell button does not load User profiles (e.g. .bashrc) after the recent update. The Run Cell button does not load User profiles (e.g. ~/.bashrc) after the recent update. Sep 26, 2024
@sourishkrout
Copy link
Member

The Run Cell button does not seem to load .bashrc after the recent update.

Hi @forseti, the latest .bashrc should load once you hit Reset Session in the notebook toolbar. What looks like a bug here is a feature of the managed environment store. :-)

Can you confirm that this works for you?

Is there anyway to load User profiles or any custom/external ENV vars for each run?

The same goes for .env.local and .env. We also have plans to support direnv, which, upon authorization, would allow running arbitrary shells and exporting env vars as part of it.

Would that help with your use case?

@forseti
Copy link
Author

forseti commented Sep 30, 2024

Hi @sourishkrout

Hi @forseti, the latest .bashrc should load once you hit Reset Session in the notebook toolbar. What looks like a bug here is a feature of the managed environment store. :-)
Can you confirm that this works for you?

I tried the Reset Session, but the new and updated ENV vars did not get loaded when I ran any command from the current session, so I had to restart the runtime to make them working again.

I think this is a minor issue for me since I can always include these vars in my scripts.

The same goes for .env.local and .env. We also have plans to support direnv, which, upon authorization, would allow running arbitrary shells and exporting env vars as part of it.
Would that help with your use case?

direnv is perfect. Thanks!

@sourishkrout
Copy link
Member

I think the issue is that we're forking/seeding the ENV with the systems, which trickles down from the code process. This is something we could do differently. It's good to hear it's a minor issue. I'd have to think about it more to determine what makes most sense.

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

No branches or pull requests

2 participants