harvester / upgrade-helpers

4 stars 9 forks source link

Add check to make sure the script is run with root #7

Closed starbops closed 1 year ago

starbops commented 1 year ago

Adding an effective UID check to make sure the script is run with the root privilege. Additionally, some essential environment variables are not inherited when calling the script with sudo; we have to inject them manually into the script.

Related issue: harvester/harvester#2132