Keep original if statement order
This commit is contained in:
parent
15291424e2
commit
e1ca45e07d
|
@ -55,11 +55,11 @@ const confirmLocalCopy = ( localE2ePath, packageE2ePath, packageName = '', force
|
||||||
const confirmPrompt = `${localE2ePath} already exists. Overwrite? [Y]es/[n]o: `;
|
const confirmPrompt = `${localE2ePath} already exists. Overwrite? [Y]es/[n]o: `;
|
||||||
|
|
||||||
let overwriteFiles;
|
let overwriteFiles;
|
||||||
if ( !fs.existsSync( localPath ) || force ) {
|
if ( ! force && fs.existsSync( localPath ) ) {
|
||||||
overwriteFiles = 'y';
|
|
||||||
} else {
|
|
||||||
overwriteFiles = confirm( confirmPrompt, 'ny' );
|
overwriteFiles = confirm( confirmPrompt, 'ny' );
|
||||||
overwriteFiles = overwriteFiles.toLowerCase();
|
overwriteFiles = overwriteFiles.toLowerCase();
|
||||||
|
} else {
|
||||||
|
overwriteFiles = 'y';
|
||||||
}
|
}
|
||||||
if ( overwriteFiles == 'y' ) {
|
if ( overwriteFiles == 'y' ) {
|
||||||
fs.copyFileSync( packagePath, localPath );
|
fs.copyFileSync( packagePath, localPath );
|
||||||
|
|
Loading…
Reference in New Issue