Skip to content

Commit

Permalink
use --immutable for yarn >= 2.
Browse files Browse the repository at this point in the history
Fixes #65
  • Loading branch information
rubys committed Oct 30, 2023
1 parent 830496c commit ac5e921
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/generators/templates/_npm_install.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ RUN <% if options.cache? %>--mount=type=cache,id=bld-bun-cache,target=/root/.bun
<% end %>bun install<% if options.lock? %> --frozen-lockfile<% end %>
<% elsif sources.join.include? 'yarn' -%>
RUN <% if options.cache? %>--mount=type=cache,id=bld-yarn-cache,target=/root/.yarn \
YARN_CACHE_FOLDER=/root/.yarn <% end %>yarn install<% if options.lock? %> --frozen-lockfile<% end %>
YARN_CACHE_FOLDER=/root/.yarn <% end %>yarn install<% if options.lock? %> --<% if yarn_version < '2' -%>frozen-lockfile<% else %>immutable<% end %><% end %>
<% else -%>
RUN <% if options.cache? %>--mount=type=cache,id=bld-npm-cache,target=/root/.npm \
<% end %>npm install
Expand Down

0 comments on commit ac5e921

Please sign in to comment.