Skip to content
This repository has been archived by the owner on Jul 30, 2021. It is now read-only.

assets: use MkdirAll to not error on existing dir #886

Merged
merged 2 commits into from Feb 12, 2018

Conversation

rphillips
Copy link
Contributor

os.Mkdir will error on an existing directory. Allows for existing mount points for assets.

Fixes #884

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Feb 12, 2018
Fixes kubernetes-retired#884

* make sure assets directory is empty
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Feb 12, 2018
@rphillips
Copy link
Contributor Author

updated the PR and e2e failed on an AWS error

return err
}
if len(files) > 0 {
return errors.New("Asset directory must be empty.")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Asset -> asset. Error strings should not be capitalized: https://github.com/golang/go/wiki/CodeReviewComments#error-strings

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@rphillips
Copy link
Contributor Author

coreosbot run e2e

@rphillips
Copy link
Contributor Author

@xiang90 could you review please

@rphillips rphillips merged commit f1bbe03 into kubernetes-retired:master Feb 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants