Fixed issue in bump script

This commit is contained in:
Donkie
2023-12-29 11:33:34 +01:00
parent 57ea0f5af9
commit 57daa961f3

View File

@@ -3,6 +3,7 @@
# ruff: noqa: PLR2004, T201, S603, S607 # ruff: noqa: PLR2004, T201, S603, S607
import json import json
import os
import re import re
import subprocess import subprocess
import sys import sys
@@ -48,7 +49,11 @@ def bump() -> None:
json.dump(node_package, f, indent=2) json.dump(node_package, f, indent=2)
# Run npm install to update the lock file with new version # Run npm install to update the lock file with new version
subprocess.run(["npm", "install"], cwd=project_root.joinpath("client"), check=True, shell=True) # noqa: S602 # On windows, shell=True is required for npm to be found
if os.name == "nt":
subprocess.run(["npm", "install"], cwd=project_root.joinpath("client"), check=True, shell=True) # noqa: S602
else:
subprocess.run(["npm", "install"], cwd=project_root.joinpath("client"), check=True)
# Stage the changed files # Stage the changed files
subprocess.run( subprocess.run(