diff options
| author | Dylan Baker <dylan@pnwbakers.com> | 2019-01-29 14:41:11 -0800 |
|---|---|---|
| committer | Jussi Pakkanen <jpakkane@gmail.com> | 2019-01-30 23:20:49 +0200 |
| commit | e2797755116725afb85eca6829d071b650cbe899 (patch) | |
| tree | 69d89ad0fb7e8f347132028c1d77e0f9a9d457e0 | |
| parent | c5a78c9e495058e61a4456fca6b6854b3823fc90 (diff) | |
| download | meson-e2797755116725afb85eca6829d071b650cbe899.tar.gz | |
dist: Handle git worktrees, which have a .git file instead of dir
This is the second most straight forward stupid way of handling
this (with usiing os.path.exists) as the most stupid obvious way. The
only major advantage is that having .git as something other than a
file or directory still doesn't register.
Fixes: #3378
| -rw-r--r-- | mesonbuild/scripts/dist.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mesonbuild/scripts/dist.py b/mesonbuild/scripts/dist.py index f49492c43..a8d9674b2 100644 --- a/mesonbuild/scripts/dist.py +++ b/mesonbuild/scripts/dist.py @@ -188,7 +188,8 @@ def run(args): dist_name = build.project_name + '-' + build.project_version - if os.path.isdir(os.path.join(src_root, '.git')): + _git = os.path.join(src_root, '.git') + if os.path.isdir(_git) or os.path.isfile(_git): names = create_dist_git(dist_name, src_root, bld_root, dist_sub, build.dist_scripts) elif os.path.isdir(os.path.join(src_root, '.hg')): names = create_dist_hg(dist_name, src_root, bld_root, dist_sub, build.dist_scripts) |
