diff --git a/clients/corral/corral.go b/clients/corral/corral.go index 931ebae7..c2a00685 100644 --- a/clients/corral/corral.go +++ b/clients/corral/corral.go @@ -18,7 +18,7 @@ import ( ) const ( - debugFlag = "--trace" + debugFlag = "--debug" skipCleanupFlag = "--skip-cleanup" corralPrivateSSHKey = "corral_private_key" corralPublicSSHKey = "corral_public_key" @@ -152,16 +152,24 @@ func waitForCorralConfig(corralName string) error { corralOSPath := homeDir + "/.corral/corrals/" + corralName + "/corral.yaml" return wait.ExponentialBackoff(backoff, func() (finished bool, err error) { - _, err = os.Stat(corralOSPath) + fileStat, err := os.Stat(corralOSPath) if err != nil { return false, nil } + if fileStat == nil { + return false, nil + } + fileContents, err := os.ReadFile(corralOSPath) if err != nil { return false, nil } + if fileContents == nil { + return false, nil + } + if len(string(fileContents)) <= 0 { return false, nil }