···105105 applescript += f' subtitle "{subtitle}"'
106106 try:
107107 LOG.info("Displaying notification")
108108- # NOTE: requires a sudoers entry like
108108+ # NOTE: requires a sudoers entry like
109109 # %admin ALL = (ALL) NOPASSWD: /path/to/this/script
110110 # to work passwordless, otherwise it won't have spotify icon
111111 # As a result, this file and its parent dir should be root-owned
···1515 exit 0
1616fi
17171818-export GIT_DIR="$YADM_HOOK_REPO"
1919-export GIT_WORKTREE="$YADM_HOOK_WORK"
2020-2121-hooks/pre-commit.pyz run --show-diff-on-failure --config .pre-commit-config.yaml || exit $?
2222-unset GIT_DIR GIT_WORKTREE
2323-2424-# TODO: Convert the remainder of this stuff to pre-commit, if feasible. For brew,
2525-# maybe just switch to nix instead and do a `darwin-rebuild check` or something
2626-2718# shellcheck source=../utils.sh
2819source utils.sh
2920···9485 exit_with_error "Untracked files found in repository:" "$untracked_files"
9586fi
96879797-if grep -q fish <(echo "$CHANGED_FILES"); then
9898- fish -c fish_check_saved_functions
9999- failed_files=$?
100100- if [[ $failed_files -ne 0 ]] ; then
101101- exit_with_error "$failed_files files failed fish lint/format checks!"
102102- fi
103103-fi
104104-10588if grep -E 'path = /|submodule "/' -- ~/.gitmodules; then
10689 exit_with_error "Submodule paths in $HOME/.gitmodules should be relative!"
10790fi
···11093 read -r -p "Some pre-commit checks had warnings. Press enter to continue or Ctrl-C to cancel."
11194fi
11295113113-# TODO: convert other scripts to fish instead of bash (except bootstrap)
114114-# or actually, just user pre-commit instead of this mess. Maybe bootstrap could
115115-# also be converted to something less complicated
9696+# It's also possible to run pre-commit directly here, but it doesn't
9797+# play as nicely with the automatic stashing/staging stuff vs a normal githook.
9898+9999+# TODO: Convert the remainder of this stuff to pre-commit, if feasible. For brew,
100100+# maybe just switch to nix instead and do a `darwin-rebuild check` or something