Commit d1bd2ea7 authored by Jameson Rollins's avatar Jameson Rollins

guardctrl: fix expansion of user home directory path

parent b4f491d6
Pipeline #47581 passed with stages
in 3 minutes and 15 seconds
......@@ -415,7 +415,7 @@ def main_remote():
# create a directory for the ssh control sockets
try:
os.makedirs('~/.ssh/controls/')
os.makedirs(os.path.expanduser('~/.ssh/controls/'))
except:
pass
......@@ -430,7 +430,8 @@ def main():
signal.signal(signal.SIGINT, signal.SIG_DFL)
signal.signal(signal.SIGPIPE, signal.SIG_DFL)
if os.path.exists('~/.guardctrl-home') or os.getenv('GUARDCTRL_LOCAL'):
if os.path.exists(os.path.expanduser('~/.guardctrl-home')) \
or os.getenv('GUARDCTRL_LOCAL'):
main_local()
elif os.getenv('GUARDCTRL_HOST'):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment