Skip to content

Commit 88b5eba

Browse files
committed
Get rid of exit codes
1 parent cd20638 commit 88b5eba

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

.github/workflows/cron-wishlist.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,11 @@ jobs:
5151

5252
- name: Process results
5353
run: |
54-
if [[ ${{ steps.fetch.outputs.exit_code }} -eq 0 && -n "${{ steps.fetch.outputs.output }}" ]]; then
54+
if [[ -n "${{ steps.fetch.outputs.output }}" ]]; then
5555
echo "${{ steps.fetch.outputs.output }}" >> "${{ env.READING_LIST_PATH }}"
5656
echo "Successfully updated reading list"
57-
elif [[ ${{ steps.fetch.outputs.exit_code }} -eq 10 ]]; then
58-
echo "No new items to add. Output: ${{ steps.fetch.outputs.output }}"
5957
else
60-
echo "Error: Unexpected exit code ${{ steps.fetch.outputs.exit_code }}"
61-
exit 1
58+
echo "No new items to add. Output: ${{ steps.fetch.outputs.output }}"
6259
fi
6360
6461
- name: Commit and push changed files

script/fetch-kobo-wishlist.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,12 @@ const main = async () => {
2121

2222
if (raw) {
2323
console.log(wishlist);
24-
Deno.exit(0);
2524
} else {
2625
const diff = await diffOf(wishlist);
2726

2827
if (diff.length) {
2928
const str = Yaml.stringify(diff);
3029
console.log(str);
31-
Deno.exit(0);
32-
} else {
33-
console.log('Nothing to sync');
34-
Deno.exit(10);
3530
}
3631
}
3732
} catch (error) {

0 commit comments

Comments
 (0)