Skip to content

Commit d63e8ed

Browse files
authored
Merge pull request #38 from launchrctl/76-avoid_recursive_discovery
76: skip discover actions for version check
2 parents a1e4399 + 35494fa commit d63e8ed

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

app.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,14 @@ func (app *appImpl) init() error {
139139
}
140140
}
141141

142+
// Skip discover actions if we check version.
143+
args := os.Args[1:]
144+
for i := 0; i < len(args); i++ {
145+
if args[i] == "--version" {
146+
return nil
147+
}
148+
}
149+
142150
// Discover actions.
143151
for _, p := range getPluginByType[ActionDiscoveryPlugin](app) {
144152
for _, fs := range app.GetRegisteredFS() {

0 commit comments

Comments
 (0)