Skip to content

Commit bad8b78

Browse files
committed
Merge pull request #759 from webcompat/fixnwin
don't depend on cat, fix #758
2 parents 14e5c7f + 4c22e87 commit bad8b78

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

run.py

+9-9
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,15 @@ def check_pip_deps():
6060
Make sure that the installed pip packages match what is in
6161
requirements.txt, prompting the user to upgrade if not.
6262
'''
63-
req = subprocess.check_output(["cat", "requirements.txt"]).splitlines()
64-
try:
65-
pkg_resources.require(req)
66-
except VersionConflict as e:
67-
print(DEPS_VERSION_HELP % e)
68-
except DistributionNotFound as e:
69-
print(DEPS_NOTFOUND_HELP % e)
70-
else:
71-
return True
63+
for req in open("requirements.txt"):
64+
try:
65+
pkg_resources.require(req)
66+
except VersionConflict as e:
67+
print(DEPS_VERSION_HELP % e)
68+
except DistributionNotFound as e:
69+
print(DEPS_NOTFOUND_HELP % e)
70+
else:
71+
return True
7272

7373

7474
def config_validator():

0 commit comments

Comments
 (0)