Skip to content

Commit

Permalink
No need to retry, lsb_release fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
koudis committed Jan 13, 2025
1 parent 32df37d commit 58d45f4
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions modules/bringauto_package/PlatformString.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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))
}
Expand Down

0 comments on commit 58d45f4

Please sign in to comment.