From 58d45f49395921eb304a287d9f62bf94563312ef Mon Sep 17 00:00:00 2001 From: Jan Kubalek Date: Mon, 13 Jan 2025 18:39:14 +0100 Subject: [PATCH] No need to retry, lsb_release fixed --- modules/bringauto_package/PlatformString.go | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/modules/bringauto_package/PlatformString.go b/modules/bringauto_package/PlatformString.go index d26f8f0..a9b7376 100644 --- a/modules/bringauto_package/PlatformString.go +++ b/modules/bringauto_package/PlatformString.go @@ -3,8 +3,8 @@ package bringauto_package import ( "bringauto/modules/bringauto_docker" "bringauto/modules/bringauto_prerequisites" - "bringauto/modules/bringauto_ssh" "bringauto/modules/bringauto_process" + "bringauto/modules/bringauto_ssh" "fmt" "regexp" "strings" @@ -165,18 +165,7 @@ func runShellCommandOverSSH(credentials bringauto_ssh.SSHCredentials, command st Command: command, } - // If the fake lsb_release run in the Docker container - // it fails in 2/3. So we try to run fake lsb_release and fake uname multiple times. - i := 0 - var commandStdOut string - for { - commandStdOut, err = commandSsh.RunCommandOverSSH(credentials) - if err != nil && i < NumberOfTriesForFakeCommands { - i++ - continue - } - break - } + commandStdOut, err := commandSsh.RunCommandOverSSH(credentials) if err != nil { panic(fmt.Errorf("cannot run command '%s', error: %s", command, err)) }