Skip to content

Commit

Permalink
fix(action/plugin-kubernetes): improve error (#5389)
Browse files Browse the repository at this point in the history
yesnault authored Aug 21, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent df87b6f commit 04dd681
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions contrib/integrations/kubernetes/plugin-kubernetes/main.go
Original file line number Diff line number Diff line change
@@ -120,6 +120,10 @@ contexts:
name: default-context
current-context: default-context`, k8sToken, certb64, k8sAPIURL)

if _, err := os.Stat(".kube"); !os.IsNotExist(err) {
return fail(".kube directory already exists, you have to delete it before using this action")
}

if err := os.Mkdir(".kube", 0755); err != nil {
return fail("Cannot create directory .kube : %v", err)
}

0 comments on commit 04dd681

Please sign in to comment.