diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..9759343 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,20 @@ +name: Lint + +on: + push: + branches: [master] + pull_request: + +jobs: + shellcheck: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Install shellcheck + run: | + sudo apt-get update + sudo apt-get install -y shellcheck + + - name: Run shellcheck + run: shellcheck bin/wt diff --git a/bin/wt b/bin/wt index 83a33e0..941b045 100755 --- a/bin/wt +++ b/bin/wt @@ -63,7 +63,7 @@ worktree_base() { else local root root="$(repo_root)" - echo "$(dirname "$root")" + dirname "$root" fi } @@ -270,7 +270,7 @@ main() { case "$mode" in pick) - pick_worktree + pick_worktree "" ;; goto) goto_worktree "$branch"