Skip to content

Commit

Permalink
Fix corral file wait and debugging option
Browse files Browse the repository at this point in the history
  • Loading branch information
caliskanugur committed Oct 28, 2024
1 parent 8ea8a1f commit 26ededc
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions clients/corral/corral.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
)

const (
debugFlag = "--trace"
debugFlag = "--debug"
skipCleanupFlag = "--skip-cleanup"
corralPrivateSSHKey = "corral_private_key"
corralPublicSSHKey = "corral_public_key"
Expand Down Expand Up @@ -152,11 +152,15 @@ 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
Expand Down

0 comments on commit 26ededc

Please sign in to comment.