File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -110,14 +110,15 @@ export function makePatch({
110110 join ( resolve ( packageDetails . path ) , "package.json" ) ,
111111 )
112112
113- // copy .npmrc/.yarnrc in case packages are hosted in private registry
114- // tslint:disable-next-line:align
115- ; [ ".npmrc" , ".yarnrc" ] . forEach ( ( rcFile ) => {
116- const rcPath = join ( appPath , rcFile )
117- if ( existsSync ( rcPath ) ) {
118- copySync ( rcPath , join ( tmpRepo . name , rcFile ) , { dereference : true } )
119- }
120- } )
113+ // copy .npmrc/.yarnrc in case packages are hosted in private registry
114+ // copy .yarn directory as well to ensure installations work in yarn 2
115+ // tslint:disable-next-line:align
116+ ; [ ".npmrc" , ".yarnrc" , ".yarn" ] . forEach ( ( rcFile ) => {
117+ const rcPath = join ( appPath , rcFile )
118+ if ( existsSync ( rcPath ) ) {
119+ copySync ( rcPath , join ( tmpRepo . name , rcFile ) , { dereference : true } )
120+ }
121+ } )
121122
122123 if ( packageManager === "yarn" ) {
123124 console . info (
You can’t perform that action at this time.
0 commit comments