forked from extern/nushell
rename toolkit's set-git-hooks
to setup-git-hooks
(#8897)
# Description
this pr renames toolkit's `set-git-hooks` to `setup-git-hooks` to match
[CONTRIBUTING.md](cbedc8403f/CONTRIBUTING.md (L112)
)
This commit is contained in:
parent
cbedc8403f
commit
6b3236715b
@ -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)"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user