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 config command to clean the environment #590

Open
jchonig opened this issue Oct 21, 2023 · 0 comments
Open

Add config command to clean the environment #590

jchonig opened this issue Oct 21, 2023 · 0 comments
Labels
C-feature request New feature request

Comments

@jchonig
Copy link

jchonig commented Oct 21, 2023

Topgrade should have a config section that can run a command string to clean the environment

I have personal directories in my path that contain binaries that can prevent topgrade from working correctly. For example, I have a scripts that facilitate logging into hosts by name, one of them is called gem. That breaks the gem upgrade.

Additionally, when working on various projects, I can see having other environment variables that could impact the proper operation of topgrade.

Proposed solution

A configuration entry that runs a command that can edit the environment. Use that environment instead of the execution environment.

Example command

env_command = "export PATH=$(echo $PATH | sed -re s%${HOME}/bin[^:]*:%:%g); export -n GIT_CONFIG"

Reference

See discussion

@SteveLauC SteveLauC added the C-feature request New feature request label Oct 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature request New feature request
Projects
None yet
Development

No branches or pull requests

2 participants