Improve flag support in install.py after #254 (#255)

This commit is contained in:
David Dworken
2024-10-07 00:09:23 -07:00
committed by GitHub
parent e55694d7e0
commit d22bba2834
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: