Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check directory is empty or not for git resource #150

Merged
merged 1 commit into from
Jul 21, 2015

Conversation

hfm
Copy link
Contributor

@hfm hfm commented Jul 17, 2015

Problem

  • Although /path/to/destination/ is an empty directory, it doesn't run git clone

Suggestion

  • Check directory is empty or not.

Problem
---

`git clone <repo> <dir>` has 3 patterns:

1. If `<dir>` is an empty directory, git executes clone.
2. If `<dir>` is NOT an empty directory, git DOESN'T execute clone.
3. If `<dir>` is a file, git DOESN'T execute clone.

Suggestion
---

It's better to check whether directory is empty or not.
ryotarai added a commit that referenced this pull request Jul 21, 2015
Check directory is empty or not for git resource
@ryotarai ryotarai merged commit eb50b97 into itamae-kitchen:master Jul 21, 2015
@ryotarai
Copy link
Member

Thank you!

@hfm hfm deleted the ensure-git-repository branch July 21, 2015 00:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants