Skip to content

Commit

Permalink
update cli prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
GreatYYX committed Nov 21, 2018
1 parent 57ef371 commit 727114c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions rltk/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,17 @@ def help_info():
if len(sys.argv) <= 1:
print('No command\n')
help_info()
sys.exit()

cmd = sys.argv[1]
sub_cmd = sys.argv[2:] if len(sys.argv) >= 3 else []
sys.argv.pop(1)

if cmd in ('help', '--help', 'h', '-h'):
help_info()
sys.exit()

sys.argv[0] = cmd # replace prog name
temp_path = os.path.join(tempfile.gettempdir(), 'rltk', 'remote')
if not os.path.exists(temp_path):
os.makedirs(temp_path, exist_ok=True)
Expand Down

0 comments on commit 727114c

Please sign in to comment.