mirror of
https://github.com/ddworken/hishtory.git
synced 2024-11-23 00:34:27 +01:00
Move up os.remove so that the file is removed even if it fails to execute
This commit is contained in:
parent
4744bb7317
commit
b3cb2690f3
@ -54,7 +54,7 @@ cmd = tmpFilePath + ' install'
|
||||
if os.environ.get('HISHTORY_OFFLINE'):
|
||||
cmd += " --offline"
|
||||
exitCode = os.system(cmd)
|
||||
os.remove(tmpFilePath)
|
||||
if exitCode != 0:
|
||||
raise Exception("failed to install downloaded hishtory client via `" + tmpFilePath +" install` (is that directory mounted noexec? Consider setting an alternate directory via the TMPDIR environment variable)!")
|
||||
os.remove(tmpFilePath)
|
||||
print('Succesfully installed hishtory! Open a new terminal, try running a command, and then running `hishtory query`.')
|
||||
|
Loading…
Reference in New Issue
Block a user