Improve flag support in install.py after #254

This commit is contained in:
David Dworken
2024-10-05 08:27:37 -07:00
parent e55694d7e0
commit 46e093f61f
3 changed files with 12 additions and 11 deletions

View File

@@ -53,8 +53,9 @@ os.system('chmod +x ' + tmpFilePath)
cmd = tmpFilePath + ' install'
if os.environ.get('HISHTORY_OFFLINE'):
cmd += " --offline"
if len(sys.argv) > 1:
cmd += " " + " ".join(sys.argv[1:])
additional_flags = [flag for flag in sys.argv[1:] if flag.startswith("-") and flag != "-"]
if additional_flags:
cmd += " " + " ".join(additional_flags)
exitCode = os.system(cmd)
os.remove(tmpFilePath)
if exitCode != 0: