From 57e68c2304c528d1183850dcbd4c6d62c34c39ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Thu, 26 Dec 2024 12:22:22 +0100 Subject: [PATCH] goenv-init: Fix use of optional variables that should not crash the calling shell if unset Just use the ${variable:-} syntax to accept unset variables --- libexec/goenv-init | 6 +++--- test/goenv-init.bats | 25 ++++++++++++------------- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/libexec/goenv-init b/libexec/goenv-init index 3e4d0912..df483402 100755 --- a/libexec/goenv-init +++ b/libexec/goenv-init @@ -108,14 +108,14 @@ EOL cat <