ofek / userpath

Cross-platform tool for adding locations to the user PATH, no elevated privileges required!
MIT License
151 stars 20 forks source link

Only add modified `PATH` to login files in login shells #48

Closed chrysle closed 11 months ago

chrysle commented 11 months ago

Part of #46

ofek commented 11 months ago

Should we modify only the RC files instead as I think that is what other programs do? Just let me know your reasoning because I don't have time to reread that other thread please

chrysle commented 11 months ago

From https://github.com/ofek/userpath/issues/3#issuecomment-661917621:

I believe the best way to treat bash users is probably to assume that the user will encounter at least one "login shell" somewhere during the login process before running userpath, and add our PATH definition to the first dotfile for bash login shells that we find. The reason I say this is that these files are also where Red Hat, Ubuntu and others suggest that users should add their own $PATH definitions.

I'm not sure how to fix the tests yet, though.

chrysle commented 11 months ago

The tests should pass now. BTW, why do you only run them on EOL 3.7?

chrysle commented 11 months ago

@ofek Could you take another look?

ofek commented 11 months ago

Is this sufficient to close the associated issues now?

chrysle commented 11 months ago

Thanks! I aim to still introduce the command line option and environment variable.

ofek commented 11 months ago

Oh great thank you!