@@ -587,14 +587,13 @@ export async function runCLI(args: RunCLIArgs): Promise<RunCLIServer> {
587
587
'home' ,
588
588
] ;
589
589
590
- if ( args [ 'mount-before-install' ] === undefined ) {
591
- args [ 'mount-before-install' ] = [ ] ;
592
- }
593
-
594
590
for ( const subdirName of userProvidableNativeSubdirs ) {
595
- const thisSubdirDoesNotHaveAMount = ! args [
596
- 'mount-before-install'
597
- ] . some ( isMountingVfsDirName ( subdirName ) ) ;
591
+ const isMountingSubdirName = ( mount : Mount ) =>
592
+ mount . vfsPath === `/${ subdirName } ` ;
593
+ const thisSubdirDoesNotHaveAMount = ! (
594
+ args [ 'mount-before-install' ] ?. some ( isMountingSubdirName ) ||
595
+ args [ 'mount' ] ?. some ( isMountingSubdirName )
596
+ ) ;
598
597
if ( thisSubdirDoesNotHaveAMount ) {
599
598
// The user isn't already mounting a native dir for this,
600
599
// so let's create a mount from within our native temp dir.
@@ -604,6 +603,10 @@ export async function runCLI(args: RunCLIArgs): Promise<RunCLIServer> {
604
603
) ;
605
604
mkdirSync ( nativeSubdirPath ) ;
606
605
606
+ if ( args [ 'mount-before-install' ] === undefined ) {
607
+ args [ 'mount-before-install' ] = [ ] ;
608
+ }
609
+
607
610
// Make the real mount first so any further subdirs are mounted into it.
608
611
args [ 'mount-before-install' ] . unshift ( {
609
612
vfsPath : `/${ subdirName } ` ,
@@ -927,12 +930,6 @@ async function zipSite(
927
930
fs . writeFileSync ( outfile , zip ) ;
928
931
}
929
932
930
- function isMountingVfsDirName ( dirName : string ) {
931
- return function matchesDirName ( mount : Mount ) {
932
- return mount . vfsPath === `/${ dirName } ` ;
933
- } ;
934
- }
935
-
936
933
const tempDirNameDelimiter = '-playground-cli-site-' ;
937
934
938
935
function generateTempDirPrefix ( ) {
0 commit comments