@@ -49,7 +49,8 @@ program
49
49
. option ( '-i, --inlinePreset <json>' , 'Skip prompts and use inline JSON string as preset' )
50
50
. option ( '-m, --packageManager <command>' , 'Use specified npm client when installing dependencies' )
51
51
. option ( '-r, --registry <url>' , 'Use specified npm registry when installing dependencies (only for npm)' )
52
- . option ( '-g, --git [message]' , 'Force / skip git initialization, optionally specify initial commit message' )
52
+ . option ( '-g, --git [message]' , 'Force git initialization with optional initial commit message' )
53
+ . option ( '-n, --no-git' , 'Skip git initialization' )
53
54
. option ( '-f, --force' , 'Overwrite target directory if it exists' )
54
55
. option ( '-c, --clone' , 'Use git clone when fetching remote preset' )
55
56
. option ( '-x, --proxy' , 'Use specified proxy when creating project' )
@@ -187,7 +188,7 @@ function cleanArgs (cmd) {
187
188
const key = o . long . replace ( / ^ - - / , '' )
188
189
// if an option is not present and Command has a method with the same name
189
190
// it should not be copied
190
- if ( typeof cmd [ key ] !== 'function' ) {
191
+ if ( typeof cmd [ key ] !== 'function' && typeof cmd [ key ] !== 'undefined' ) {
191
192
args [ key ] = cmd [ key ]
192
193
}
193
194
} )
0 commit comments