Skip to content

exec prints the install of a missing version to stdout, next to the output of the command #823

Done

Description

@linghengqian

vfox exec installs a version that is not installed yet, as the "Auto Install" tip in docs/usage/core-commands.md says. The messages of that install go to standard output, which is also where the output of the command goes. A pipeline that reads the output of the command therefore gets the install messages first.

Reproduction on a GitHub-hosted runner (Ubuntu 26.04.1, x86_64) with the vfox 1.1.0 release archive (checksum verified) and the zip archive of the vfox-etcd v0.2.3 tag. Run: https://github.com/version-fox/vfox-plus/actions/runs/45056971190

vfox add --source vfox-etcd-v0.2.3.zip
vfox exec [email protected] -- etcd --version 2>/dev/null | head -1

Actual output: the first line is SDK [email protected] not found, installing....

The complete standard output of vfox exec [email protected] -- etcd --version in the same run starts with:

SDK [email protected] not found, installing...
etcd download url: https://github.com/etcd-io/etcd/releases/download/v3.5.12/etcd-v3.5.12-linux-amd64.tar.gz
Preinstalling [email protected]...
Verifying checksum f2ff0cb4...
Unpacking .../etcd-v3.5.12-linux-amd64.tar.gz...
etcd installed path: .../v-3.5.12/etcd-3.5.12

and then the output of etcd --version. The download progress is on standard error. After the install, the same command's standard output starts with etcd Version: 3.5.12.

Expected: the messages of the installation go to standard error, so that the standard output of vfox exec ... -- <command> is the output of the command.

Where it comes from: cmd/commands/exec.go:169 prints SDK %s@%s not found, installing... with fmt.Printf. internal/sdk/sdk.go:388 and internal/sdk/sdk.go:434 print the install messages with pterm.Printf, which writes to standard output. The plugin's own print calls, such as the download URL above, also write to standard output.

The docs recommend vfox exec for Docker and CI (docs/usage/core-commands.md), where the output of the command is often captured.

Activity

  1. added
    bug
    help wanted
    and removed
    help wanted
    on Nov 22, 2026
  2. added this to the 1.1.1 milestone on Nov 23, 2026
  3. added 2 commits that reference this issue on Nov 23, 2026
    94a2049
    9cc9ca9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions