diff options
| -rwxr-xr-x | scripts/oe-setup-layers | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/oe-setup-layers b/scripts/oe-setup-layers index c8012fa670..6d49688a32 100755 --- a/scripts/oe-setup-layers +++ b/scripts/oe-setup-layers | |||
| @@ -20,13 +20,13 @@ import os | |||
| 20 | import subprocess | 20 | import subprocess |
| 21 | 21 | ||
| 22 | def _is_repo_git_repo(repodir): | 22 | def _is_repo_git_repo(repodir): |
| 23 | git_dir = os.path.join(repodir, ".git") | ||
| 24 | if not os.access(git_dir, os.R_OK): | ||
| 25 | return False | ||
| 26 | try: | 23 | try: |
| 27 | return subprocess.check_output("git -C %s rev-parse --is-inside-git-dir" % git_dir, shell=True, stderr=subprocess.DEVNULL) | 24 | curr_toplevel = subprocess.check_output("git -C %s rev-parse --show-toplevel" % repodir, shell=True, stderr=subprocess.DEVNULL) |
| 25 | if curr_toplevel.strip().decode("utf-8") == repodir: | ||
| 26 | return True | ||
| 28 | except subprocess.CalledProcessError: | 27 | except subprocess.CalledProcessError: |
| 29 | return False | 28 | pass |
| 29 | return False | ||
| 30 | 30 | ||
| 31 | def _is_repo_at_rev(repodir, rev): | 31 | def _is_repo_at_rev(repodir, rev): |
| 32 | try: | 32 | try: |
