mirror of
https://gitee.com/johng/gf
synced 2026-06-06 02:25:47 +08:00
## Summary - Fix `gf env` and `gf build --dumpEnv` command failing when `go env` outputs warning messages - When `go env` outputs warnings (e.g., invalid characters in environment variables), it returns non-zero exit code but still provides valid output - The original code would fail in this case ## Changes - Only fail when `go env` returns empty output, allow non-zero exit code with valid output - Skip lines that don't match `key=value` format instead of failing with Fatal error - Add debug log for skipped lines to help troubleshooting - Add unit tests for env command ## Related Issue Fixes #4469 ## Test plan - [x] `gf env` command works correctly even when `go env` outputs warnings - [x] `gf build --dumpEnv` works correctly - [x] Added unit tests pass
28 lines
280 B
Plaintext
28 lines
280 B
Plaintext
.buildpath
|
|
.hgignore.swp
|
|
.project
|
|
.orig
|
|
.swp
|
|
.idea/
|
|
.settings/
|
|
.vscode/
|
|
vendor/
|
|
bin/
|
|
**/.DS_Store
|
|
.test/
|
|
cmd/gf/main
|
|
cmd/gf/gf
|
|
temp/
|
|
example/log
|
|
go.work
|
|
go.work.sum
|
|
!cmd/gf/go.work
|
|
.windsurfrules
|
|
|
|
# Ignore for docs
|
|
node_modules
|
|
.docusaurus
|
|
output
|
|
.example/
|
|
.golangci.bck.yml
|
|
*.exe |