exec prints the install of a missing version to stdout, next to the output of the command
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
Research direction
The stray output comes from cmd/commands/exec.go near line 169, where fmt.Printf prints the 'not found, installing' message, and from internal/sdk/sdk.go around lines 388 and 434, where pterm.Printf writes install messages to standard output. Start by reading those call sites and check whether they can write to standard error instead. Done means that vfox exec [email protected] -- etcd --version 2>/dev/null | head -1 prints the command's own output first, with install messages absent from stdout.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- Go
- Stars
- 4k
- Forks
- 177
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 31
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from version-fox/vfox
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
version-fox/vfox#825 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 Half a day Newbie friendliness 45/100
version-fox/vfox#824 ·
Maintainers usually reply within 1 day
-
Plugins fail to load when the HOME path contains ';' or '?' (Lua package.path)Possibly taken @Xnadir claimed this today. Openbug
Difficulty 3/5 1-2 days Newbie friendliness 35/100
version-fox/vfox#821 ·
Maintainers usually reply within 1 day
-
[BUG]: the Available cache ignores the environment, so one setting's list is shown for anotherPossibly taken @nanami7777777 claimed this today. Openbug
Difficulty 3/5 1-2 days Newbie friendliness 25/100
version-fox/vfox#816 ·
Maintainers usually reply within 1 day
-
[Feature]: treat two names of one install as the same versionPossibly taken @Detoy claimed this today. Openenhancement
Difficulty 4/5 3-5 days Newbie friendliness 30/100
version-fox/vfox#814 ·
Maintainers usually reply within 1 day
All issues in version-fox/vfox
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 2 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
seaweedfs/seaweed-block#443 ·
Maintainers usually reply within 1 day
-
HTTP `batch.Send` returns nil and inserts no rows when the block does not encodePossibly taken @Indian-boult claimed this today. Openbug queries
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
ClickHouse/clickhouse-go#2155 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
transparency-dev/tessera#1286 ·
Maintainers usually reply within 1 day