File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -175,7 +175,7 @@ runs:
175175 echo "Files key found, proceeding to create files..."
176176
177177 # Get each key from files object and create a file with that name
178- jq -r '.files | keys[]' "$RESPONSE_FILE" | while read -r filename; do
178+ while IFS= read -r filename; do
179179 echo "Processing file: $filename"
180180
181181 # Get the content for this filename
@@ -208,11 +208,7 @@ runs:
208208 echo "Created documentation file: $output_dir/$output_filename"
209209 MARKDOWN_FILES_CREATED=$((MARKDOWN_FILES_CREATED + 1))
210210 fi
211- done
212-
213- # Since we're in a subshell, we need to count files differently
214- MARKDOWN_FILES_CREATED=$(find "$MD_OUTPUT_DIR" -name "*${OUTPUT_FORMAT}" 2>/dev/null | wc -l || echo "0")
215- JSON_FILES_CREATED=$(find "$JSON_OUTPUT_DIR" -name "*.json" 2>/dev/null | wc -l || echo "0")
211+ done < <(jq -r '.files | keys[]' "$RESPONSE_FILE")
216212 else
217213 echo "No 'files' key found in response JSON"
218214 fi
@@ -247,4 +243,4 @@ runs:
247243 echo "json_files_created=$JSON_FILES_CREATED" >> $GITHUB_OUTPUT
248244 echo "output_directory=$MD_OUTPUT_DIR" >> $GITHUB_OUTPUT
249245 echo "json_directory=$JSON_OUTPUT_DIR" >> $GITHUB_OUTPUT
250- echo "has_changes=$HAS_CHANGES" >> $GITHUB_OUTPUT
246+ echo "has_changes=$HAS_CHANGES" >> $GITHUB_OUTPUT
You can’t perform that action at this time.
0 commit comments