Skip to content

Commit

Permalink
Update seedfarmer/mgmt/metadata_support.py
Browse files Browse the repository at this point in the history
Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
  • Loading branch information
kukushking and clokep authored Jan 23, 2025
1 parent ae499f3 commit edd8995
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions seedfarmer/mgmt/metadata_support.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,8 @@ def convert_cdkexports(
else:
clean_jq_path = _clean_jq(jq_path)
_logger.info("Pulling with jq path '%s' from %s file", clean_jq_path, json_file)
with open("tmp-metadata", "w") as outfile:
cat_process = subprocess.Popen(["cat", cdk_output_path], stdout=subprocess.PIPE, shell=False)
subprocess.run(["jq", clean_jq_path], stdin=cat_process.stdout, stdout=outfile, shell=False)
with open(cdk_output_path, "r") as infile, open("tmp-metadata", "w") as outfile:
subprocess.run(["jq", clean_jq_path], stdin=infile, stdout=outfile, shell=False)
data = json.loads(open("tmp-metadata", "r").read())

existing_metadata = _read_metadata_file(mms)
Expand Down

0 comments on commit edd8995

Please sign in to comment.