Addressed PR Feedback

This commit is contained in:
Christopher Allford 2022-02-28 09:39:19 -08:00
parent cd9aad9a3d
commit 8bb027279a
3 changed files with 7 additions and 7 deletions

View File

@ -1,3 +1,3 @@
@echo off @echo off
node "%~dp0\dev" %* node "%~dp0\dev" %*

View File

@ -88,7 +88,7 @@ export default class Merge extends Command {
} }
/** /**
* Validates all of the arguments to make sure * Validates all of the arguments to make sure they're compatible with the command.
* *
* @param {string} source The GitHub repository we are merging. * @param {string} source The GitHub repository we are merging.
* @param {string} destination The local path we're merging into. * @param {string} destination The local path we're merging into.
@ -102,15 +102,15 @@ export default class Merge extends Command {
} }
// We can't merge into a directory that already exists. // We can't merge into a directory that already exists.
let existence = false; let exists = false;
try { try {
await access( join( MONOREPO_ROOT, destination ) ); await access( join( MONOREPO_ROOT, destination ) );
existence = true; exists = true;
} catch (err: any) { } catch (err: any) {
existence = false; exists = false;
} }
if ( existence ) { if ( exists ) {
this.error('The "destination" argument points to a directory that already exists'); this.error('The "destination" argument points to a directory that already exists');
} }
} }

View File

@ -42,4 +42,4 @@ export async function exec( command: string, options?: ExecOptions ): Promise< s
resolve( stdout ); resolve( stdout );
} ); } );
} ); } );
} }