Skip to content

Commit

Permalink
chore: simplify logic
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanJosipovic committed Apr 18, 2023
1 parent 978b0d0 commit 3cfbc94
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -566,13 +566,8 @@ public static ExecCredentialResponse ExecuteExternalCommand(ExternalExecution co
}

// Wait for a maximum of 5 seconds, if a response takes longer probably something went wrong...
if (!process.WaitForExit(5000))
if (!process.WaitForExit(5000) && string.IsNullOrWhiteSpace(stderr))
{
if (!string.IsNullOrWhiteSpace(stderr))
{
throw new KubeConfigException($"external exec failed due to: {stderr}");
}

throw new KubeConfigException("external exec failed due to timeout");
}

Expand Down

0 comments on commit 3cfbc94

Please sign in to comment.