exec prints the install of a missing version to stdout, next to the output of the command
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
余計な出力は、cmd/commands/exec.go の169行目付近にある fmt.Printf が 'not found, installing' メッセージを表示している箇所と、internal/sdk/sdk.go の388行目と434行目付近にある pterm.Printf がインストールメッセージを標準出力に書き込んでいる箇所から出ています。まずこれらの呼び出し箇所を読み、標準エラー出力に書き込めるかどうかを確認してください。vfox exec [email protected] -- etcd --version 2>/dev/null | head -1 がまずコマンド自身の出力を表示し、インストールメッセージが標準出力に現れなくなれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Go
- スター
- 4k
- フォーク
- 177
- 平均マージ
- 1日 20時間
- マージ済み PR(30日)
- 31
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
version-fox/vfox のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
version-fox/vfox#825 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 半日 初心者へのやさしさ 45/100
version-fox/vfox#824 ·
メンテナーはふだん 1 日以内に返信
-
Plugins fail to load when the HOME path contains ';' or '?' (Lua package.path)対応中かも @Xnadir が今日担当しました。 オープンbug
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
version-fox/vfox#821 ·
メンテナーはふだん 1 日以内に返信
-
[BUG]: the Available cache ignores the environment, so one setting's list is shown for another対応中かも @nanami7777777 が今日担当しました。 オープンbug
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
version-fox/vfox#816 ·
メンテナーはふだん 1 日以内に返信
-
[Feature]: treat two names of one install as the same version対応中かも @Detoy が今日担当しました。 オープンenhancement
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
version-fox/vfox#814 ·
メンテナーはふだん 1 日以内に返信
version-fox/vfox の issue をすべて見る
似ている issue
-
go good first issue test
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 2 日以内に返信
-
[UI] Guard webApis against undefined window in SSR environments対応中かも @madhavzanwar が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
kind/enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
automated-analysis code-quality refactoring
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
github/gh-aw-mcpg#17105 ·
メンテナーはふだん 1 日以内に返信