diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 27fbeb5..4b173a0 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -10,7 +10,7 @@ jobs: test: strategy: matrix: - platform: [ubuntu-20.04, ubuntu-18.04, macos-11, macos-10.15] + platform: [ubuntu-20.04, macos-11] runs-on: ${{ matrix.platform }} steps: - uses: actions/checkout@v2 diff --git a/todo.sh b/todo.sh index ca624ad..9f20299 100755 --- a/todo.sh +++ b/todo.sh @@ -500,7 +500,8 @@ replaceOrPrepend() fixMissingEndOfLine() { # Parameters: $1: todo file; empty means $TODO_FILE. - sed -i.bak -e '$a\' "${1:-$TODO_FILE}" + todo_path="${1:-$TODO_FILE}" + [[ -f $todo_path && $(tail -c1 "$todo_path") ]] && echo "" >> "$todo_path" } uppercasePriority()