Skip to content

Commit

Permalink
Move back to bash string vs array
Browse files Browse the repository at this point in the history
  • Loading branch information
Soren Ptak committed Jul 21, 2023
1 parent b1a5034 commit 0c12406
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions executable-monitor/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,30 +46,30 @@ runs:
run: |
# Run Executable with Monitoring
echo "::group::Argument Parsing"
optArgs=("")
optArgs=""
# Make sure we have an exit condition to look for
if [ "${{ inputs.success-exit-code }}" = "" ] && [ "${{ inputs.success-line }}" = "" ]; then
echo "::endgroup::"
echo -e "\033[32;31mDid not supply an input of success-line or success-exit-code to search for\033[0m"
exit 1
fi
# Check if an exit code was provided
if [ "${{ inputs.success-exit-code }}" != "" ]; then
optArgs="(--success-exit-code=${{ inputs.success-exit-code }} "$optArgs""
echo "Adding --success-exit-code=${{ inputs.success-exit-code }}) to the call"
optArgs+=(--success-exit-code=${{ inputs.success-exit-code }})
fi
# Check for log directory/if a log file should be created
if [ "${{ inputs.log-dir }}" != "" ]; then
optArgs="(--log-dir=${{ inputs.log-dir}}) "$optArgs""
echo "Adding --log-dir=${{ inputs.log-dir}} to the call"
optArgs+=(--log-dir=${{ inputs.log-dir}})
fi
# Check for retry attempts
if [ "${{ inputs.retry-attempts }}" != "" ]; then
optArgs="--retry-attempts=${{ inputs.retry-attempts}} "$optArgs""
echo "Adding --retry-attempts=${{ inputs.retry-attemps}} to the call"
optArgs+=(--retry-attempts=${{ inputs.retry-attempts}})
fi
# Check if a success line was provided. Converting the github input to a bash variable
Expand Down

0 comments on commit 0c12406

Please sign in to comment.