diff options
author | Ash McKenzie <amckenzie@gitlab.com> | 2020-10-19 14:29:12 +1100 |
---|---|---|
committer | Ash McKenzie <amckenzie@gitlab.com> | 2020-10-19 18:53:12 +1100 |
commit | 0478ba97950bd6606f823c8a26eeeecf617df653 (patch) | |
tree | df79ee09d7dfa952589d3bd8dbab61f2f3c2cfb9 /internal/command/command.go | |
parent | f5f9ffc086fe52e2651fb498a76673bda3392bfd (diff) | |
download | gitlab-shell-0478ba97950bd6606f823c8a26eeeecf617df653.tar.gz |
Set SSL_CERT_DIR env var when building commandashmckenzie/set-ssl-cert-dir-env-var
Diffstat (limited to 'internal/command/command.go')
-rw-r--r-- | internal/command/command.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/command/command.go b/internal/command/command.go index 7e0617e..a2c5912 100644 --- a/internal/command/command.go +++ b/internal/command/command.go @@ -2,6 +2,7 @@ package command import ( "context" + "os" "gitlab.com/gitlab-org/gitlab-shell/internal/command/authorizedkeys" "gitlab.com/gitlab-org/gitlab-shell/internal/command/authorizedprincipals" @@ -34,6 +35,10 @@ func New(e *executable.Executable, arguments []string, config *config.Config, re } if cmd := buildCommand(e, args, config, readWriter); cmd != nil { + if config.SslCertDir != "" { + os.Setenv("SSL_CERT_DIR", config.SslCertDir) + } + return cmd, nil } |