summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2019-11-21 08:10:01 +0530
committerTim-Philipp Müller <tim@centricular.com>2019-11-26 19:18:44 +0000
commitc9d6fabf4ca539b8a1afe1fab97575ece4ced524 (patch)
tree96aa7b07e6de71ab48eee6682549b818aeeb5b71
parentb264efe08244800f1978221c5332324a3060f54e (diff)
cerbero: Fix exception when running fetch-cache
If you call cerbero as `cerbero-uninstalled` (without `./` in the beginning, say if it's in your `PATH`), `git_dir` will be set to `''`, and `subprocess.Popen` does not handle `cwd=''` very well. Avoid doing that by always using the absolute path.
-rw-r--r--cerbero/commands/fetch.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/cerbero/commands/fetch.py b/cerbero/commands/fetch.py
index 9a57bd3e..b0114363 100644
--- a/cerbero/commands/fetch.py
+++ b/cerbero/commands/fetch.py
@@ -243,7 +243,7 @@ class FetchCache(Command):
raise FatalError(_("fetch-cache is only available with "
"cerbero-uninstalled"))
- git_dir = os.path.dirname(sys.argv[0])
+ git_dir = os.path.abspath(os.path.dirname(sys.argv[0]))
sha = git.get_hash(git_dir, args.commit)
deps = self.get_deps(config, args)
if not args.skip_fetch: