Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion cmd/root/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,9 @@ We collect anonymous usage data to help improve cagent. To disable:
rootCmd.SetErr(stderr)
setContextRecursive(ctx, rootCmd)

if plugin.RunningStandalone() {
// when running 'docker ai', env vars are set for cli plugin and RunningStandalone is false, but ai shells out to cagent
// if the command is 'cagent' we want to run cagent standalone (there's no 'docker cagent')
if plugin.RunningStandalone() || rootCmd.Name() == "cagent" {
// When no subcommand is given, default to "run".
rootCmd.SetArgs(defaultToRun(rootCmd, args))

Expand Down