2020-12-27 14:24:52 +00:00
|
|
|
diff --git a/test/test.py b/test/test.py
|
2023-03-15 16:39:30 +00:00
|
|
|
index db674a4..b6c797e 100755
|
2020-12-27 14:24:52 +00:00
|
|
|
--- a/test/test.py
|
|
|
|
+++ b/test/test.py
|
2023-03-15 16:39:30 +00:00
|
|
|
@@ -130,7 +130,7 @@ class TestYq(unittest.TestCase):
|
2020-12-27 14:24:52 +00:00
|
|
|
tf2.seek(0)
|
2023-03-15 16:39:30 +00:00
|
|
|
self.assertEqual(self.run_yq("", ["-y", arg, tf.name, self.fd_path(tf2)]), "1\n...\n")
|
|
|
|
|
2020-12-27 14:24:52 +00:00
|
|
|
- @unittest.skipIf(subprocess.check_output(["jq", "--version"]) < b"jq-1.6", "Test options introduced in jq 1.6")
|
|
|
|
+ @unittest.skipIf(subprocess.check_output(["@jq@", "--version"]) < b"jq-1.6", "Test options introduced in jq 1.6")
|
|
|
|
def test_jq16_arg_passthrough(self):
|
2023-03-15 16:39:30 +00:00
|
|
|
self.assertEqual(
|
|
|
|
self.run_yq("{}", ["--indentless", "-y", ".a=$ARGS.positional", "--args", "a", "b"]), "a:\n- a\n- b\n"
|
2020-12-27 14:24:52 +00:00
|
|
|
diff --git a/yq/__init__.py b/yq/__init__.py
|
2023-03-15 16:39:30 +00:00
|
|
|
index 0ccb8e8..8342ff0 100644
|
2020-12-27 14:24:52 +00:00
|
|
|
--- a/yq/__init__.py
|
|
|
|
+++ b/yq/__init__.py
|
2023-03-15 16:39:30 +00:00
|
|
|
@@ -206,7 +206,7 @@ def yq(
|
2021-06-28 23:13:55 +00:00
|
|
|
# Notes: universal_newlines is just a way to induce subprocess to make stdin a text buffer and encode it for us;
|
|
|
|
# close_fds must be false for command substitution to work (yq . t.yml --slurpfile t <(yq . t.yml))
|
2023-03-15 16:39:30 +00:00
|
|
|
jq = subprocess.Popen(
|
|
|
|
- ["jq"] + list(jq_args),
|
|
|
|
+ ["@jq@"] + list(jq_args),
|
|
|
|
stdin=subprocess.PIPE,
|
|
|
|
stdout=subprocess.PIPE if converting_output else None,
|
|
|
|
close_fds=False,
|