diff options
| author | Paul Buetow <paul@buetow.org> | 2026-03-03 10:45:50 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-03-03 10:45:50 +0200 |
| commit | 2de007f9ef8ae2724b9fbe2808ee25cbfe4ca876 (patch) | |
| tree | f91a742d682928ef12eb5a011411c3bb0ef16a02 /internal/config/initializer.go | |
| parent | 6d50a475114699911f2ebe1376915cd8317f1881 (diff) | |
feat(config): add auth-key CLI and server cache settings
Diffstat (limited to 'internal/config/initializer.go')
| -rw-r--r-- | internal/config/initializer.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/internal/config/initializer.go b/internal/config/initializer.go index 146d1a0..b540457 100644 --- a/internal/config/initializer.go +++ b/internal/config/initializer.go @@ -92,6 +92,10 @@ func (in *initializer) processEnvVars(args *Args) { if len(sshPrivateKeyPathFile) > 0 && args.SSHPrivateKeyFilePath == "" { args.SSHPrivateKeyFilePath = sshPrivateKeyPathFile } + authKeyPath := os.Getenv("DTAIL_AUTH_KEY_PATH") + if len(authKeyPath) > 0 && args.SSHPrivateKeyFilePath == "" { + args.SSHPrivateKeyFilePath = authKeyPath + } // Check if turbo boost should be disabled from environment variable // Turbo boost is enabled by default, can be explicitly disabled if Env("DTAIL_TURBOBOOST_DISABLE") { @@ -113,6 +117,18 @@ func (in *initializer) setupConfig(sourceCb transformCb, args *Args, if args.NoColor { in.Client.TermColorsEnable = false } + if args.NoAuthKey { + in.Client.AuthKeyDisable = true + } + if in.Client.AuthKeyDisable { + args.NoAuthKey = true + } + if args.SSHPrivateKeyFilePath == "" { + args.SSHPrivateKeyFilePath = in.Client.AuthKeyPath + } + if args.SSHPrivateKeyFilePath != "" { + in.Client.AuthKeyPath = args.SSHPrivateKeyFilePath + } if args.LogDir != "" { in.Common.LogDir = args.LogDir } |
