File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
grails-shell/src/main/groovy/org/grails/cli/profile/commands Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -210,6 +210,19 @@ class CreateAppCommand extends ArgumentCompletingCommand implements ProfileRepos
210210 def mainCommandLine = executionContext. commandLine
211211 def profileName = evaluateProfileName(mainCommandLine)
212212
213+ List<String > validFlags = [INPLACE_FLAG , PROFILE_FLAG , FEATURES_FLAG ]
214+ mainCommandLine. undeclaredOptions. each { String key , Object value ->
215+ if (! validFlags. contains(key)) {
216+ List possibleSolutions = validFlags. findAll { it. substring(0 , 2 ) == key. substring(0 , 2 ) }
217+ StringBuilder warning = new StringBuilder (" Unrecognized flag: ${ key} ." )
218+ if (possibleSolutions) {
219+ warning. append(" Possible solutions: " )
220+ warning. append(possibleSolutions. join(" , " ))
221+ }
222+ GrailsConsole . instance. warn(warning. toString())
223+ }
224+ }
225+
213226 Profile profileInstance = profileRepository. getProfile(profileName)
214227 if ( ! validateProfile(profileInstance, profileName, executionContext)) {
215228 return false
You can’t perform that action at this time.
0 commit comments