Skip to content

Commit 0d14765

Browse files
committed
Only show internal commands and features by using flag only, removing flag all
Closes gh-1073 See gh-1042
1 parent 38bd483 commit 0d14765

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

grace-shell/src/main/groovy/org/grails/cli/profile/commands/ProfileInfoCommand.groovy

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class ProfileInfoCommand extends ArgumentCompletingCommand implements GlobalComm
4848

4949
ProfileInfoCommand() {
5050
description.argument(name: 'Profile Name', description: 'The name or coordinates of the profile', required: true)
51-
description.flag(name: 'all', type: 'boolean', description: 'Show all commands and features', required: false)
51+
description.flag(name: 'only', type: 'boolean', description: "Only show the commands and features of this profile", required: false)
5252
}
5353

5454
void setProfileRepository(ProfileRepository profileRepository) {
@@ -63,7 +63,7 @@ class ProfileInfoCommand extends ArgumentCompletingCommand implements GlobalComm
6363
return false
6464
}
6565

66-
boolean showAll = executionContext.commandLine.hasOption('all')
66+
boolean showAll = !executionContext.commandLine.hasOption('only')
6767
def profileName = executionContext.commandLine.remainingArgs[0]
6868

6969
Profile profile = profileRepository.getProfile(profileName)
@@ -132,7 +132,7 @@ class ProfileInfoCommand extends ArgumentCompletingCommand implements GlobalComm
132132

133133
private static Iterable<Feature> getFeatures(Profile profile, boolean includeParents) {
134134
Set<Feature> allFeatures = []
135-
allFeatures.addAll(profile.features)
135+
allFeatures.addAll(profile.internalFeatures)
136136
if (includeParents) {
137137
Iterable<Profile> parents = profile.extends
138138
for (Profile p in parents) {

0 commit comments

Comments
 (0)