diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2020-05-26 05:52:16 +0200 |
---|---|---|
committer | Andrew Gregory <andrew@archlinux.org> | 2020-06-18 11:04:15 +0200 |
commit | d69da08abef42a52d2fa81daf4c045c3305598cf (patch) | |
tree | 4142e7488341744b806b604488b4a9ab0ee9bc30 /scripts/libmakepkg/executable | |
parent | 12503767c0be8f3eb28433fd58bcab0ec6f44a26 (diff) | |
download | pacman-d69da08abef42a52d2fa81daf4c045c3305598cf.tar.gz pacman-d69da08abef42a52d2fa81daf4c045c3305598cf.tar.xz |
makepkg: guard against undefined git pinned sources
If something like source=(..."#commit=") is used, e.g. due to failed
variable expansion, we try to check out an empty refspec as nothing at
all, and end up just running "git checkout". This happens because we
fail at variable expansion too -- so let's quote our variables properly
and make sure git sees this as an empty refspec, so it can error out.
Also make sure it is interpreted as a ref instead of a path.
Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
(cherry picked from commit 817f9fb715b4e90d28bc141dfccfc530b9e951dc)
Diffstat (limited to 'scripts/libmakepkg/executable')
0 files changed, 0 insertions, 0 deletions