run scripts in the foreground

This commit is contained in:
Brian Hicks 2023-05-03 15:34:53 -05:00
parent c63a3176e3
commit 76c9c22bc6
No known key found for this signature in database
GPG Key ID: C4F324B9CAAB0D50

View File

@ -22,11 +22,6 @@ if __name__ == "__main__":
help="The package-lock.json corresponding to package.json",
default="package-lock.json",
)
parser.add_argument(
"--no-ignore-scripts",
action="store_true",
help="Don't run package post-install scripts",
)
parser.add_argument(
"--bin-dir",
help="Path to a node installation's binary directory. If present, will be treated as an extra entry in PATH for the duration of this command.",
@ -45,9 +40,7 @@ if __name__ == "__main__":
shutil.copy(args.package, os.path.join(tempdir, "package.json"))
shutil.copy(args.package_lock, os.path.join(tempdir, "package-lock.json"))
cmd = ["npm", "clean-install"]
if not args.no_ignore_scripts:
cmd.append("--ignore-scripts")
cmd = ["npm", "clean-install", "--foreground-scripts"]
proc = subprocess.Popen(cmd, cwd=tempdir)
proc.communicate()