mirror of
https://github.com/ddworken/hishtory.git
synced 2025-06-23 21:41:38 +02: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'):
|
if os.environ.get('HISHTORY_OFFLINE'):
|
||||||
cmd += " --offline"
|
cmd += " --offline"
|
||||||
exitCode = os.system(cmd)
|
exitCode = os.system(cmd)
|
||||||
|
os.remove(tmpFilePath)
|
||||||
if exitCode != 0:
|
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)!")
|
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`.')
|
print('Succesfully installed hishtory! Open a new terminal, try running a command, and then running `hishtory query`.')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user