From f0282781781bc9426f6c692226a01f54418c5923 Mon Sep 17 00:00:00 2001 From: Bryan McNulty Date: Wed, 12 Mar 2025 08:23:41 -0500 Subject: Small optimizations --- cmd/root.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'cmd/root.go') diff --git a/cmd/root.go b/cmd/root.go index 116ed21..f596c75 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -17,7 +17,12 @@ var ( ctx context.Context authOpts *adauth.Options - debug bool + hostname string + + // Root flags + debug bool + + // Generic flags command string executable string executablePath string @@ -62,6 +67,9 @@ func needsTarget(proto string) func(cmd *cobra.Command, args []string) error { if target == nil { return fmt.Errorf("no target supplied") } + if hostname, err = target.Hostname(ctx); err != nil { + log.Debug().Err(err).Msg("Could not get target hostname") + } return } } -- cgit v1.2.3