From dda8e7dfa1620aca7a26f778d425850257dd3a65 Mon Sep 17 00:00:00 2001 From: Kevin Gartland Date: Wed, 31 Jan 2024 10:43:23 -0500 Subject: [PATCH] convert to string for windows --- test/bats/justfile | 3 ++- test/deploy_helper.py | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/test/bats/justfile b/test/bats/justfile index 1e0492dd8..54a0e9850 100644 --- a/test/bats/justfile +++ b/test/bats/justfile @@ -80,7 +80,8 @@ test-contract: # content_list will contain all content in content_list=$(python ../deploy_helper.py) - for i in ${content_list} + IFS=' ' read -ra my_array <<< "${content_list}" + for i in ${my_array[@]} do # only test when we have a .publisher-env file for the content if [[ -f ../content/bundles/${i}/test/.publisher-env ]]; then diff --git a/test/deploy_helper.py b/test/deploy_helper.py index 5995c93b0..69440ca68 100755 --- a/test/deploy_helper.py +++ b/test/deploy_helper.py @@ -16,8 +16,10 @@ subdirectories = [d for d in os.listdir(directory_path) if os.path.isdir(os.path.join(directory_path, d))] # Iterate over the subdirectories - print(f"Subdirectories of the '{directory_name}' directory:") + content_list = [] for subdirectory in subdirectories: - print(subdirectory) + content_list.append(subdirectory) + content_string = " ".join(content_list) + print(content_string) else: print(f"The '{directory_name}' directory does not exist in the same directory as the script.") \ No newline at end of file