less than 1 minute read

When using the sudo command:

you may depend on environment-variables … being set, and these might not survive the switch to root with sudo, which resets environment by default.

To get around this, you can run sudo with the -E switch, sudo -E …, which retains environment variables.

The long name for this option is --preserve-env – I prefer to use long names in scripts to make these easier to understand next week, next month, and especially next year…!

Via github.com/git-lfs.

Tags: ,

Categories:

Updated:

Leave a comment