This commit is contained in:
Catalina Peralta 2024-02-13 17:25:04 -08:00
Родитель 52848a8783
Коммит c3a2b46c9b
1 изменённых файлов: 10 добавлений и 2 удалений

Просмотреть файл

@ -20,8 +20,12 @@ export async function createPackageJson(rootPath: string, deps: Set<string>): Pr
}
export async function npmCIDependencies(workingDir: string): Promise<void> {
const args = ["ci"];
if (process.env['TSPCLIENT_UNSAFE_FORCE'] === "force") {
args.push("--force");
}
return new Promise((resolve, reject) => {
const npm = spawn("npm", ["ci"], {
const npm = spawn("npm", args, {
cwd: workingDir,
stdio: "inherit",
shell: true,
@ -40,8 +44,12 @@ export async function npmCIDependencies(workingDir: string): Promise<void> {
}
export async function npmInstallDependencies(workingDir: string): Promise<void> {
const args = ["install"];
if (process.env['TSPCLIENT_UNSAFE_FORCE'] === "force") {
args.push("--force");
}
return new Promise((resolve, reject) => {
const npm = spawn("npm", ["install", "--no-lock-file"], {
const npm = spawn("npm", args, {
cwd: workingDir,
stdio: "inherit",
shell: true,