Skip to content

Commit

Permalink
bugfix: add '|| true' to CLI commands
Browse files Browse the repository at this point in the history
This prevents the workflow from terminating early if the CLI hits an error.
  • Loading branch information
elaguerta-nr committed May 13, 2024
1 parent 1366e8d commit 864e76a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/fossa-elixir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
export LIST_TARGETS_OUT_FILE=${{ runner.temp }}/list-targets_out.txt
export LIST_TARGETS_ERR_FILE=${{ runner.temp }}/list-targets_err.txt
fossa list-targets --format text 1>$LIST_TARGETS_OUT_FILE 2>$LIST_TARGETS_ERR_FILE
fossa list-targets --format text 1>$LIST_TARGETS_OUT_FILE 2>$LIST_TARGETS_ERR_FILE || true
if [[ $(grep -i "error" $LIST_TARGETS_ERR_FILE | wc -l) -gt 0 ]]
then
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
run: |
export ANALYZE_OUT_FILE=${{ runner.temp }}/analyze_out.txt
export ANALZYE_ERR_FILE=${{ runner.temp }}/analyze_err.txt
fossa analyze --policy='New Relic Public Github' 1>$ANALYZE_OUT_FILE 2>$ANALZYE_ERR_FILE
fossa analyze --policy='New Relic Public Github' 1>$ANALYZE_OUT_FILE 2>$ANALZYE_ERR_FILE || true
if [[ $(grep -i "error" $ANALYZE_ERR_FILE | wc -l) -gt 0 ]]
then
echo "::error::fossa analyze ran with errors."
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/fossa-gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
export LIST_TARGETS_OUT_FILE=${{ runner.temp }}/list-targets_out.txt
export LIST_TARGETS_ERR_FILE=${{ runner.temp }}/list-targets_err.txt
fossa list-targets --format text 1>$LIST_TARGETS_OUT_FILE 2>$LIST_TARGETS_ERR_FILE
fossa list-targets --format text 1>$LIST_TARGETS_OUT_FILE 2>$LIST_TARGETS_ERR_FILE || true
if [[ $(grep -i "error" $LIST_TARGETS_ERR_FILE | wc -l) -gt 0 ]]
then
Expand Down Expand Up @@ -81,7 +81,7 @@ jobs:
run: |
export ANALYZE_OUT_FILE=${{ runner.temp }}/analyze_out.txt
export ANALZYE_ERR_FILE=${{ runner.temp }}/analyze_err.txt
fossa analyze --policy='New Relic Public Github' 1>$ANALYZE_OUT_FILE 2>$ANALZYE_ERR_FILE
fossa analyze --policy='New Relic Public Github' 1>$ANALYZE_OUT_FILE 2>$ANALZYE_ERR_FILE || true
if [[ $(grep -i "error" $ANALYZE_ERR_FILE | wc -l) -gt 0 ]]
then
echo "::error::fossa analyze ran with errors."
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/fossa-ruby-bundler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
export LIST_TARGETS_OUT_FILE=${{ runner.temp }}/list-targets_out.txt
export LIST_TARGETS_ERR_FILE=${{ runner.temp }}/list-targets_err.txt
fossa list-targets --format text 1>$LIST_TARGETS_OUT_FILE 2>$LIST_TARGETS_ERR_FILE
fossa list-targets --format text 1>$LIST_TARGETS_OUT_FILE 2>$LIST_TARGETS_ERR_FILE || true
if [[ $(grep -i "error" $LIST_TARGETS_ERR_FILE | wc -l) -gt 0 ]]
then
Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:
run: |
export ANALYZE_OUT_FILE=${{ runner.temp }}/analyze_out.txt
export ANALZYE_ERR_FILE=${{ runner.temp }}/analyze_err.txt
fossa analyze --policy='New Relic Public Github' 1>$ANALYZE_OUT_FILE 2>$ANALZYE_ERR_FILE
fossa analyze --policy='New Relic Public Github' 1>$ANALYZE_OUT_FILE 2>$ANALZYE_ERR_FILE || true
if [[ $(grep -i "error" $ANALYZE_ERR_FILE | wc -l) -gt 0 ]]
then
echo "::error::fossa analyze ran with errors."
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/fossa-scala.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
export LIST_TARGETS_OUT_FILE=${{ runner.temp }}/list-targets_out.txt
export LIST_TARGETS_ERR_FILE=${{ runner.temp }}/list-targets_err.txt
fossa list-targets --format text 1>$LIST_TARGETS_OUT_FILE 2>$LIST_TARGETS_ERR_FILE
fossa list-targets --format text 1>$LIST_TARGETS_OUT_FILE 2>$LIST_TARGETS_ERR_FILE || true
if [[ $(grep -i "error" $LIST_TARGETS_ERR_FILE | wc -l) -gt 0 ]]
then
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
run: |
export ANALYZE_OUT_FILE=${{ runner.temp }}/analyze_out.txt
export ANALZYE_ERR_FILE=${{ runner.temp }}/analyze_err.txt
fossa analyze --policy='New Relic Public Github' 1>$ANALYZE_OUT_FILE 2>$ANALZYE_ERR_FILE
fossa analyze --policy='New Relic Public Github' 1>$ANALYZE_OUT_FILE 2>$ANALZYE_ERR_FILE || true
if [[ $(grep -i "error" $ANALYZE_ERR_FILE | wc -l) -gt 0 ]]
then
echo "::error::fossa analyze ran with errors."
Expand Down

0 comments on commit 864e76a

Please sign in to comment.