21055: Fix unreported error due to shadowed err variable.
authorTom Clegg <tom@curii.com>
Tue, 17 Oct 2023 18:54:32 +0000 (14:54 -0400)
committerTom Clegg <tom@curii.com>
Tue, 17 Oct 2023 18:54:32 +0000 (14:54 -0400)
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom@curii.com>

lib/install/deps.go

index 9078ef77824705078c628608941b186896ee4eac..81b2fad921f8c51382a995b38dad397053e0e59e 100644 (file)
@@ -231,7 +231,7 @@ func (inst *installCommand) RunCommand(prog string, args []string, stdin io.Read
        }
 
        if dev || test {
-               if havedockerversion, err := exec.Command("docker", "--version").CombinedOutput(); err == nil {
+               if havedockerversion, err2 := exec.Command("docker", "--version").CombinedOutput(); err2 == nil {
                        logger.Printf("%s installed, assuming that version is ok", bytes.TrimSuffix(havedockerversion, []byte("\n")))
                } else if osv.Debian {
                        var codename string