force git command to run in /data/openpilot/

This commit is contained in:
dragonpilot
2020-02-11 17:08:15 +10:00
parent 3e2a9e8136
commit d04f4ffa31
+3 -3
View File
@@ -367,12 +367,12 @@ def main(gctx=None):
if not ping_failed:
# download application update
git_fetch_output = run(NICE_LOW_PRIORITY + ["git", "fetch"])
git_fetch_output = run(NICE_LOW_PRIORITY + ["git", "-C", "/data/openpilot/", "fetch"])
cloudlog.info("git fetch success: %s", git_fetch_output)
# Write update available param
cur_hash = run(["git", "rev-parse", "HEAD"]).rstrip()
upstream_hash = run(["git", "rev-parse", "@{u}"]).rstrip()
cur_hash = run(["git", "-C", "/data/openpilot/", "rev-parse", "HEAD"]).rstrip()
upstream_hash = run(["git", "-C", "/data/openpilot/", "rev-parse", "@{u}"]).rstrip()
cloudlog.info("comparing %s to %s" % (cur_hash, upstream_hash))
params.put("UpdateAvailable", str(int(cur_hash != upstream_hash)))