Skip to content

Commit

Permalink
fix(planner/node.js): Run apt update and install in same step
Browse files Browse the repository at this point in the history
  • Loading branch information
yuaanlin committed Oct 17, 2023
1 parent 67a6873 commit 138056e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions internal/nodejs/plan.go
Original file line number Diff line number Diff line change
Expand Up @@ -409,16 +409,14 @@ func GetInstallCmd(ctx *nodePlanContext) string {
needPlaywright := DetermineNeedPlaywright(ctx)
if needPlaywright {
cmds = append([]string{
"RUN apt-get update",
"RUN apt-get install -y libnss3 libatk1.0-0 libatk-bridge2.0-0 libcups2 libdbus-1-3 libdrm2 libxkbcommon-x11-0 libxcomposite-dev libxdamage1 libxfixes-dev libxrandr2 libgbm-dev libasound2",
"RUN apt-get update && apt-get install -y libnss3 libatk1.0-0 libatk-bridge2.0-0 libcups2 libdbus-1-3 libdrm2 libxkbcommon-x11-0 libxcomposite-dev libxdamage1 libxfixes-dev libxrandr2 libgbm-dev libasound2",
}, cmds...)
}

needPuppeteer := DetermineNeedPuppeteer(ctx)
if needPuppeteer {
cmds = append([]string{
"RUN apt-get update",
"RUN apt-get install -y libnss3 libatk1.0-0 libatk-bridge2.0-0 libcups2 libgbm1 libasound2 libpangocairo-1.0-0 libxss1 libgtk-3-0 libxshmfence1 libglu1",
"RUN apt-get update && apt-get install -y libnss3 libatk1.0-0 libatk-bridge2.0-0 libcups2 libgbm1 libasound2 libpangocairo-1.0-0 libxss1 libgtk-3-0 libxshmfence1 libglu1",
"ENV PUPPETEER_CACHE_DIR=/src/.cache/puppeteer",
}, cmds...)
}
Expand Down

0 comments on commit 138056e

Please sign in to comment.