Skip to content

Commit

Permalink
Merge pull request #3 from wistia/mew/handle_code_comments
Browse files Browse the repository at this point in the history
refactor: .tool-versions can include code comments so avoid trying to env-varify those
  • Loading branch information
okize authored Oct 13, 2023
2 parents 06b609a + c441309 commit fecb17a
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@ runs:
shell: bash
run: |
while IFS= read -r line; do
NAME="$(echo $line | cut -d' ' -f1)${{inputs.postfix}}"
if [ "${{inputs.uppercase}}" == "true" ]; then NAME="$(echo $NAME | tr [:lower:] [:upper:])"; fi
VALUE=$(echo $line | cut -d' ' -f2-)
if [[ $line != \#* ]]; then
NAME="$(echo $line | cut -d' ' -f1)${{inputs.postfix}}"
if [ "${{inputs.uppercase}}" == "true" ]; then NAME="$(echo $NAME | tr [:lower:] [:upper:])"; fi
echo "$NAME=$VALUE" >> $GITHUB_ENV
VALUE=$(echo $line | cut -d' ' -f2-)
echo "$NAME=$VALUE" >> $GITHUB_ENV
fi
done < ${{inputs.filename}}

0 comments on commit fecb17a

Please sign in to comment.