mirror of
https://github.com/nushell/nushell
synced 2024-11-10 07:04:13 +00:00
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
1 changed files with 3 additions and 3 deletions
|
@ -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 a new issue