Skip to content

Commit

Permalink
rename toolkit's set-git-hooks to setup-git-hooks (#8897)
Browse files Browse the repository at this point in the history
# Description
this pr renames toolkit's `set-git-hooks` to `setup-git-hooks` to match
[CONTRIBUTING.md](https://github.com/nushell/nushell/blob/cbedc8403f6fc58896069d6dae59f2e2a5725036/CONTRIBUTING.md?plain=1#L112)
  • Loading branch information
1Kinoti committed Apr 16, 2023
1 parent cbedc84 commit 6b32367
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions toolkit.nu
Expand Up @@ -231,16 +231,16 @@ export def "check pr" [
# set up git hooks to run:
# - `toolkit fmt --check --verbose` on `git commit`
# - `toolkit fmt --check --verbose` and `toolkit clippy --verbose` on `git push`
export def set-git-hooks [] {
export def setup-git-hooks [] {
if $nu.os-info.name == windows {
return (print "This git hook isn't available on Windows. Sorry!")
}

print "This command will change your local git configuration and hence modify your development workflow. Are you sure you want to continue? [y]"
if (input) == "y" {
print $"running ('toolkit set-git-hooks' | pretty-print-command)"
print $"running ('toolkit setup-git-hooks' | pretty-print-command)"
git config --local core.hooksPath .githooks
} else {
print $"aborting ('toolkit set-git-hooks' | pretty-print-command)"
print $"aborting ('toolkit setup-git-hooks' | pretty-print-command)"
}
}

0 comments on commit 6b32367

Please sign in to comment.