From 221ff5d08361ff5ec6bda7037e5403f809f3091d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Gr=C3=BCner?= <47506558+MegaRedHand@users.noreply.github.com> Date: Fri, 1 Nov 2024 14:22:21 -0300 Subject: [PATCH] fix: specify file path when reading artifact --- kurtosis_package/keys.star | 4 +++- kurtosis_package/shared_utils.star | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/kurtosis_package/keys.star b/kurtosis_package/keys.star index 7fbd486e..7a4d6461 100644 --- a/kurtosis_package/keys.star +++ b/kurtosis_package/keys.star @@ -73,7 +73,9 @@ def generate_keys(plan, egnkey_service_name, key_type, artifact_name): } if key_type == "ecdsa": - address = shared_utils.read_json_artifact(plan, artifact_name, ".address") + address = shared_utils.read_json_artifact( + plan, artifact_name, ".address", file_path="keys/1.ecdsa.key.json" + ) # Prepend the address with "0x" manually keys_info["address"] = "0x" + address diff --git a/kurtosis_package/shared_utils.star b/kurtosis_package/shared_utils.star index ff7a3202..7616af8a 100644 --- a/kurtosis_package/shared_utils.star +++ b/kurtosis_package/shared_utils.star @@ -26,11 +26,13 @@ def generate_artifact(plan, context, artifact_name): return artifact -def read_json_artifact(plan, artifact_name, json_field): +def read_json_artifact(plan, artifact_name, json_field, file_path="*.json"): input_dir = "/_input" result = plan.run_sh( image="badouralix/curl-jq", - run="jq -j {field} {input}/*.json".format(field=json_field, input=input_dir), + run="jq -j {field} {input}/{path}".format( + field=json_field, input=input_dir, path=file_path + ), files={input_dir: artifact_name}, wait="1s", )