Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 21.05 26 lines 1.4 kB view raw
1diff --git a/test/test.py b/test/test.py 2index a81f41b..9e80f04 100755 3--- a/test/test.py 4+++ b/test/test.py 5@@ -112,7 +112,7 @@ class TestYq(unittest.TestCase): 6 tf2.seek(0) 7 self.assertEqual(self.run_yq("", ["-y", arg, tf.name, self.fd_path(tf2)]), '1\n...\n') 8 9- @unittest.skipIf(subprocess.check_output(["jq", "--version"]) < b"jq-1.6", "Test options introduced in jq 1.6") 10+ @unittest.skipIf(subprocess.check_output(["@jq@", "--version"]) < b"jq-1.6", "Test options introduced in jq 1.6") 11 def test_jq16_arg_passthrough(self): 12 self.assertEqual(self.run_yq("{}", ["--indentless", "-y", ".a=$ARGS.positional", "--args", "a", "b"]), 13 "a:\n- a\n- b\n") 14diff --git a/yq/__init__.py b/yq/__init__.py 15index afeb42c..a0d7970 100755 16--- a/yq/__init__.py 17+++ b/yq/__init__.py 18@@ -146,7 +146,7 @@ def yq(input_streams=None, output_stream=None, input_format="yaml", output_forma 19 20 try: 21 # Note: universal_newlines is just a way to induce subprocess to make stdin a text buffer and encode it for us 22- jq = subprocess.Popen(["jq"] + list(jq_args), 23+ jq = subprocess.Popen(["@jq@"] + list(jq_args), 24 stdin=subprocess.PIPE, 25 stdout=subprocess.PIPE if converting_output else None, 26 universal_newlines=True)