Skip to content

Disable -H when using _sudo=True #1204

Closed Answered by DrSensor
DrSensor asked this question in Q&A
Discussion options

You must be logged in to vote

my current solution

from os import getenv

_sudo = True
_env = {"HOME": f"/home/{getenv("USER")}"}

but dunno, this feel awkward.
I think _sudo_always_set_home=False + _preserve_sudo_env=True is better 🤔

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by DrSensor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant