@@ -565,14 +565,13 @@ export async function runCLI(args: RunCLIArgs): Promise<RunCLIServer> {
565
565
'home' ,
566
566
] ;
567
567
568
- if ( args [ 'mount-before-install' ] === undefined ) {
569
- args [ 'mount-before-install' ] = [ ] ;
570
- }
571
-
572
568
for ( const subdirName of userProvidableNativeSubdirs ) {
573
- const thisSubdirDoesNotHaveAMount = ! args [
574
- 'mount-before-install'
575
- ] . some ( isMountingVfsDirName ( subdirName ) ) ;
569
+ const isMountingSubdirName = ( mount : Mount ) =>
570
+ mount . vfsPath === `/${ subdirName } ` ;
571
+ const thisSubdirDoesNotHaveAMount = ! (
572
+ args [ 'mount-before-install' ] ?. some ( isMountingSubdirName ) ||
573
+ args [ 'mount' ] ?. some ( isMountingSubdirName )
574
+ ) ;
576
575
if ( thisSubdirDoesNotHaveAMount ) {
577
576
// The user isn't already mounting a native dir for this,
578
577
// so let's create a mount from within our native temp dir.
@@ -582,6 +581,10 @@ export async function runCLI(args: RunCLIArgs): Promise<RunCLIServer> {
582
581
) ;
583
582
mkdirSync ( nativeSubdirPath ) ;
584
583
584
+ if ( args [ 'mount-before-install' ] === undefined ) {
585
+ args [ 'mount-before-install' ] = [ ] ;
586
+ }
587
+
585
588
// Make the real mount first so any further subdirs are mounted into it.
586
589
args [ 'mount-before-install' ] . unshift ( {
587
590
vfsPath : `/${ subdirName } ` ,
@@ -905,12 +908,6 @@ async function zipSite(
905
908
fs . writeFileSync ( outfile , zip ) ;
906
909
}
907
910
908
- function isMountingVfsDirName ( dirName : string ) {
909
- return function matchesDirName ( mount : Mount ) {
910
- return mount . vfsPath === `/${ dirName } ` ;
911
- } ;
912
- }
913
-
914
911
const tempDirNameDelimiter = '-playground-cli-site-' ;
915
912
916
913
function generateTempDirPrefix ( ) {
0 commit comments