File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
apps/rush-lib/src/scripts Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ import * as path from 'path';
1919import { IPackageJson } from '@microsoft/node-core-library' ;
2020
2121export const RUSH_JSON_FILENAME : string = 'rush.json' ;
22- const RUSH_TEMP_FOLDER : string = 'RUSH_TEMP_FOLDER' ;
22+ const RUSH_TEMP_FOLDER_ENV_VARIABLE_NAME : string = 'RUSH_TEMP_FOLDER' ;
2323const INSTALLED_FLAG_FILENAME : string = 'installed.flag' ;
2424const NODE_MODULES_FOLDER_NAME : string = 'node_modules' ;
2525const PACKAGE_JSON_FILENAME : string = 'package.json' ;
@@ -372,7 +372,16 @@ function writeFlagFile(packageInstallFolder: string): void {
372372}
373373
374374function getRushTempFolder ( rushCommonFolder : string ) : string {
375- return process . env [ RUSH_TEMP_FOLDER ] || ensureAndJoinPath ( rushCommonFolder , 'temp' ) ;
375+ const rushTempFolder : string | undefined = process . env [ RUSH_TEMP_FOLDER_ENV_VARIABLE_NAME ] ;
376+ if ( rushTempFolder !== undefined ) {
377+ if ( ! fs . existsSync ( rushTempFolder ) ) {
378+ fs . mkdirSync ( rushTempFolder ) ;
379+ }
380+
381+ return rushTempFolder ;
382+ }
383+
384+ return ensureAndJoinPath ( rushCommonFolder , 'temp' ) ;
376385}
377386
378387export function installAndRun (
You can’t perform that action at this time.
0 commit comments