Skip to content

Commit db4a4f0

Browse files
committed
Don't ignore scripts for code-server prod yarn
1 parent d192726 commit db4a4f0

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

ci/build.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ class Builder {
135135
])
136136
})
137137

138-
await this.copyDependencies("code-server", this.rootPath, this.buildPath, {
138+
await this.copyDependencies("code-server", this.rootPath, this.buildPath, false, {
139139
commit,
140140
version: this.codeServerVersion,
141141
})
@@ -181,13 +181,19 @@ class Builder {
181181
])
182182
})
183183

184-
await this.copyDependencies("vs code", this.vscodeSourcePath, vscodeBuildPath, {
184+
await this.copyDependencies("vs code", this.vscodeSourcePath, vscodeBuildPath, true, {
185185
commit,
186186
date: new Date().toISOString(),
187187
})
188188
}
189189

190-
private async copyDependencies(name: string, sourcePath: string, buildPath: string, merge: object): Promise<void> {
190+
private async copyDependencies(
191+
name: string,
192+
sourcePath: string,
193+
buildPath: string,
194+
ignoreScripts: boolean,
195+
merge: object,
196+
): Promise<void> {
191197
await this.task(`copying ${name} dependencies`, async () => {
192198
return Promise.all(
193199
["node_modules", "package.json", "yarn.lock"].map((fileName) => {
@@ -214,7 +220,9 @@ class Builder {
214220

215221
if (process.env.MINIFY) {
216222
await this.task(`restricting ${name} to production dependencies`, async () => {
217-
await util.promisify(cp.exec)("yarn --production --ignore-scripts", { cwd: buildPath })
223+
await util.promisify(cp.exec)(`yarn --production ${ignoreScripts ? "--ignore-scripts" : ""}`, {
224+
cwd: buildPath,
225+
})
218226
})
219227
}
220228
}

0 commit comments

Comments
 (0)