Addressed PR Feedback
This commit is contained in:
parent
cd9aad9a3d
commit
8bb027279a
|
@ -1,3 +1,3 @@
|
|||
@echo off
|
||||
|
||||
node "%~dp0\dev" %*
|
||||
node "%~dp0\dev" %*
|
||||
|
|
|
@ -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} 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.
|
||||
let existence = false;
|
||||
let exists = false;
|
||||
try {
|
||||
await access( join( MONOREPO_ROOT, destination ) );
|
||||
existence = true;
|
||||
exists = true;
|
||||
} catch (err: any) {
|
||||
existence = false;
|
||||
exists = false;
|
||||
}
|
||||
|
||||
if ( existence ) {
|
||||
if ( exists ) {
|
||||
this.error('The "destination" argument points to a directory that already exists');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -42,4 +42,4 @@ export async function exec( command: string, options?: ExecOptions ): Promise< s
|
|||
resolve( stdout );
|
||||
} );
|
||||
} );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue