You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
merge: resolve conflicts with main (PR #329 merged)
Both branches made equivalent fixes to shared wfctl files. Resolved
by taking main's versions for shared code (plugin_install, lockfile,
registry_source, generator, docs) while preserving engine-branch-only
additions (integrity, autofetch, engine auto-fetch, config).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
directURL:=fs.String("url", "", "Install from a direct download URL (tar.gz archive)")
75
75
localPath:=fs.String("local", "", "Install from a local plugin directory")
76
76
fs.Usage=func() {
77
-
fmt.Fprintf(fs.Output(), "Usage: wfctl plugin install [options] [<name>[@<version>]]\n\nInstall a plugin from the registry, a URL, a local directory, or from the lockfile.\n\n wfctl plugin install <name> Install latest from registry\n wfctl plugin install <name>@<ver> Install specific version\n wfctl plugin install --url <url> Install from direct URL\n wfctl plugin install --local <dir> Install from local directory\n wfctl plugin install Install all from .wfctl.yaml\n\nOptions:\n")
77
+
fmt.Fprintf(fs.Output(), "Usage: wfctl plugin install [options] [<name>[@<version>]]\n\nInstall a plugin from the registry, a URL, a local directory, or from the lockfile.\n\n wfctl plugin install <name> Install latest from registry\n wfctl plugin install <name>@v1.0.0 Install specific version\n wfctl plugin install --url <url> Install from a direct download URL\n wfctl plugin install --local <dir> Install from a local build directory\n wfctl plugin install Install all plugins from .wfctl.yaml\n\nOptions:\n")
78
78
fs.PrintDefaults()
79
79
}
80
80
iferr:=fs.Parse(args); err!=nil {
81
81
returnerr
82
82
}
83
83
84
-
// Validate mutual exclusivityof install modes.
85
-
modes:=0
84
+
// Enforce mutual exclusivity: at most one of --url, --local, or positional args.
85
+
exclusiveCount:=0
86
86
if*directURL!="" {
87
-
modes++
87
+
exclusiveCount++
88
88
}
89
89
if*localPath!="" {
90
-
modes++
90
+
exclusiveCount++
91
91
}
92
92
iffs.NArg() >0 {
93
-
modes++
93
+
exclusiveCount++
94
94
}
95
-
ifmodes>1 {
96
-
returnfmt.Errorf("specify only one of: <name>, --url, or --local")
95
+
ifexclusiveCount>1 {
96
+
returnfmt.Errorf("--url, --local, and <name> are mutually exclusive; specify only one")
0 commit comments