diff options
author | Rutger Broekhoff | 2023-12-30 22:32:05 +0100 |
---|---|---|
committer | Rutger Broekhoff | 2023-12-30 22:32:05 +0100 |
commit | 1bb44f6746fdbe4257be2422bf105fb14487ece8 (patch) | |
tree | 7e82fe82a5327add84801ef803b98efa6dcbaa09 /cmd | |
parent | b1d813a5b1f960b751b8dff5bdd7f6d1059949d0 (diff) | |
download | gitolfs3-1bb44f6746fdbe4257be2422bf105fb14487ece8.tar.gz gitolfs3-1bb44f6746fdbe4257be2422bf105fb14487ece8.zip |
Only print environment when dying
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/git-lfs-server/main.go | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/cmd/git-lfs-server/main.go b/cmd/git-lfs-server/main.go index 934f2ea..c1b08f6 100644 --- a/cmd/git-lfs-server/main.go +++ b/cmd/git-lfs-server/main.go | |||
@@ -437,6 +437,10 @@ func log(msg string, args ...any) { | |||
437 | } | 437 | } |
438 | 438 | ||
439 | func die(msg string, args ...any) { | 439 | func die(msg string, args ...any) { |
440 | log("Environment variables: (dying)") | ||
441 | for _, s := range os.Environ() { | ||
442 | log(" %s", s) | ||
443 | } | ||
440 | log(msg, args...) | 444 | log(msg, args...) |
441 | os.Exit(1) | 445 | os.Exit(1) |
442 | } | 446 | } |
@@ -459,11 +463,6 @@ func loadPublicKey(path string) ed25519.PublicKey { | |||
459 | } | 463 | } |
460 | 464 | ||
461 | func main() { | 465 | func main() { |
462 | log("Environment variables:") | ||
463 | for _, s := range os.Environ() { | ||
464 | log(" %s", s) | ||
465 | } | ||
466 | |||
467 | anonUser := os.Getenv("ANON_USER") | 466 | anonUser := os.Getenv("ANON_USER") |
468 | publicKeyPath := os.Getenv("GITOLFS3_PUBLIC_KEY_PATH") | 467 | publicKeyPath := os.Getenv("GITOLFS3_PUBLIC_KEY_PATH") |
469 | endpoint := os.Getenv("S3_ENDPOINT") | 468 | endpoint := os.Getenv("S3_ENDPOINT") |