From b90d1958b2135350b86617d0af80a0f3b974a61b Mon Sep 17 00:00:00 2001 From: Andrew Woodlee Date: Tue, 11 Feb 2025 12:19:09 -0600 Subject: [PATCH] [WIP] v0.7.0 fix comments --- cmd/host.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/cmd/host.go b/cmd/host.go index 4666e2e..fb66a9a 100644 --- a/cmd/host.go +++ b/cmd/host.go @@ -44,13 +44,12 @@ func Host(cmd *cobra.Command, args []string) { if hostsList == nil { logging.ExitWithMSG("error: hosts must be specified", 1, &backyConfOpts.Logger) } - // host is only checked when we read the SSH File - // so a check may not be needed here - // but we can check if the host is in the config file + for _, h := range hostsList { + // check if h exists in the config file _, hostFound := backyConfOpts.Hosts[h] if !hostFound { - // check if h exists in the config file + // check if h exists in the SSH config file hostFoundInConfig, s := backy.CheckIfHostHasHostName(h) if !hostFoundInConfig { logging.ExitWithMSG("host "+h+" not found", 1, &backyConfOpts.Logger)