Skip to content

Commit

Permalink
feat: Multiline fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jaironalves committed Jul 12, 2024
1 parent 12baa18 commit a0904c4
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ _set_github_output() {
local keyNameOutput="$1"
local keyNameOutputValue="$2"

keyNameOutputValueEscapedLineCount=$(echo -e "$keyNameOutputValue" | wc -l)
keyNameOutputValueLineCount=$(echo -e "$keyNameOutputValue" | wc -l)

if [ $keyNameOutputValueEscapedLineCount -gt 1 ]; then
if [ $keyNameOutputValueLineCount -gt 1 ]; then
keyNameOutputValueMultiline=$(_key_name_output_value_to_multiline "$keyNameOutputValue")
{
echo "$keyNameOutput<<EOF"
Expand All @@ -124,9 +124,7 @@ _set_github_outputs() {
local dotReplacement="$4"

keysNamesOutputsValues=$(_yaml_keys_names_outputs_values "$yamlFile" "$filteringKeys" "$renamingOutputs" "$dotReplacement")
echo "Keys names outputs:"
echo "$keysNamesOutputsValues"


echo "$keysNamesOutputsValues" | while read -r keyNameOutputValueLine; do
keyNameOutput="${keyNameOutputValueLine%%=*}"
keyNameOutputValue="${keyNameOutputValueLine#*=}"
Expand Down

0 comments on commit a0904c4

Please sign in to comment.