Skip to content

Commit

Permalink
Properly do the network-liveness testing for khan-linter updating.
Browse files Browse the repository at this point in the history
I finally figured out why the `git ls-remote` was timing out so often!
I had intended for it to run in the khan-linter repo, which we know is
rather small.  But it was actually running it whatever directory you
happened to be in (which not be in inside a git repo at all!)  Oops.

Issue: none

Auditors: benkraft

Test plan:
Ran
   ka-lint app.yaml
in webapp/ with success.  Before this change I got a timeout error
when I did that.
  • Loading branch information
csilvers committed May 24, 2020
1 parent 7c8bf0e commit 1e05bc3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions runlint.py
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,7 @@ def _maybe_pull():
# needs to contact the remote. If you know of a
# faster one, feel free to sub it in!
['git', 'ls-remote', 'origin', 'master'],
cwd=os.path.dirname(__file__),
stdout=devnull, stderr=devnull)
if rc != 0:
raise RuntimeError('git ls-remote returned %s' % rc)
Expand Down

0 comments on commit 1e05bc3

Please sign in to comment.