Skip to content

Commit

Permalink
Tweak workflow condition
Browse files Browse the repository at this point in the history
  • Loading branch information
mikogs committed Oct 30, 2023
1 parent d18deec commit e5478d2
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/test-replace-string.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ jobs:
- name: Check newline replacement
shell: bash
run: |
if [[ '${{ steps.replace-newlines.outputs.replaced-string }}' != 'Line without anything to replace%The following should contain an apple: __APPLE__ is red%And the following shall be \\'$AZERO\\': __CURRENCY__%Thanks!' ]]; then
# yamllint disable-line rule:line-length
if [[ '${{ steps.replace-newlines.outputs.replaced-string }}' != 'Line without anything to replace%The following should contain an apple: __APPLE__ is red%And the following shall be \\'$AZERO\\': __CURRENCY__%Thanks!%' ]]; then
echo "!!! Action failed to replace newline characters"
exit 1
fi
3 changes: 0 additions & 3 deletions replace-string/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30066,11 +30066,8 @@ try {
outReplacedString = outReplacedString.replace(regex, inReplaceWithArr[i]);
}
} else {
console.log('Got replace regex of: '+inReplaceRegex)
console.log('Got replace with of: '+inReplaceWith)
const regex = new RegExp(inReplaceRegex, inFlags);
outReplacedString = outReplacedString.replace(regex, inReplaceWith);
console.log('Got replaced-string: '+outReplacedString)
}

// Output
Expand Down
3 changes: 0 additions & 3 deletions replace-string/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,8 @@ try {
outReplacedString = outReplacedString.replace(regex, inReplaceWithArr[i]);
}
} else {
console.log('Got replace regex of: '+inReplaceRegex)
console.log('Got replace with of: '+inReplaceWith)
const regex = new RegExp(inReplaceRegex, inFlags);
outReplacedString = outReplacedString.replace(regex, inReplaceWith);
console.log('Got replaced-string: '+outReplacedString)
}

// Output
Expand Down

0 comments on commit e5478d2

Please sign in to comment.