fixed small typo in variables and function call (#1297)

Signed-off-by: chaosinthecrd <tom@tmlabs.co.uk>
This commit is contained in:
Tom Meadows 2023-05-30 00:08:06 +01:00 committed by GitHub
parent af9030a383
commit 36a13bc55a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 7 deletions

View File

@ -162,8 +162,8 @@ func Init(runtimeVersion, dashboardVersion string, dockerNetwork string, slimMod
setAirGapInit(fromDir)
if !slimMode {
// If --slim installation is not requested, check if docker is installed.
conatinerRuntimeAvailable := utils.IsDockerInstalled() || utils.IsPodmanInstalled()
if !conatinerRuntimeAvailable {
containerRuntimeAvailable := utils.IsDockerInstalled() || utils.IsPodmanInstalled()
if !containerRuntimeAvailable {
return fmt.Errorf("could not connect to %s. %s may not be installed or running", containerRuntime, containerRuntime)
}

View File

@ -321,8 +321,8 @@ func TestInitLogActualContainerRuntimeName(t *testing.T) {
{"podman", "Init should log podman as container runtime"},
{"docker", "Init should log docker as container runtime"},
}
conatinerRuntimeAvailable := utils.IsDockerInstalled() || utils.IsPodmanInstalled()
if conatinerRuntimeAvailable {
containerRuntimeAvailable := utils.IsDockerInstalled() || utils.IsPodmanInstalled()
if containerRuntimeAvailable {
t.Skip("Skipping test as container runtime is available")
}
for _, test := range tests {

View File

@ -92,9 +92,9 @@ func Uninstall(uninstallAll bool, dockerNetwork string, containerRuntime string,
containerRuntime = strings.TrimSpace(containerRuntime)
runtimeCmd := utils.GetContainerRuntimeCmd(containerRuntime)
conatinerRuntimeAvailable := false
conatinerRuntimeAvailable = utils.IsDockerInstalled() || utils.IsPodmanInstalled()
if conatinerRuntimeAvailable {
containerRuntimeAvailable := false
containerRuntimeAvailable = utils.IsDockerInstalled() || utils.IsPodmanInstalled()
if containerRuntimeAvailable {
containerErrs = removeContainers(uninstallPlacementContainer, uninstallAll, dockerNetwork, runtimeCmd)
}