File tree 2 files changed +2
-1
lines changed
2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,7 @@ program
64
64
. option ( '-g, --git [message]' , 'Force git initialization with initial commit message' )
65
65
. option ( '-n, --no-git' , 'Skip git initialization' )
66
66
. option ( '-f, --force' , 'Overwrite target directory if it exists' )
67
+ . option ( '--merge' , 'Merge target directory if it exists' )
67
68
. option ( '-c, --clone' , 'Use git clone when fetching remote preset' )
68
69
. option ( '-x, --proxy' , 'Use specified proxy when creating project' )
69
70
. option ( '-b, --bare' , 'Scaffold project without beginner instructions' )
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ async function create (projectName, options) {
30
30
exit ( 1 )
31
31
}
32
32
33
- if ( fs . existsSync ( targetDir ) ) {
33
+ if ( fs . existsSync ( targetDir ) && ! options . merge ) {
34
34
if ( options . force ) {
35
35
await fs . remove ( targetDir )
36
36
} else {
You can’t perform that action at this time.
0 commit comments