misc: rename install-git-hooks.go to add-git-hooks.go (#20144)
`go run` builds a manifest-less .exe, so Windows applies installer- detection heuristics and requests admin privileges to programs that contains "install", "setup", or "update". Rename to dodge that. Updates #20133 Change-Id: I144d3fcb076d7a02e4a3eb9fd079ee022a035c76 Signed-off-by: Fernando Serboncini <fserb@tailscale.com>
This commit is contained in:
@@ -15,7 +15,7 @@ import (
|
||||
|
||||
// Install writes the launcher to .git/hooks/ts-git-hook and runs it
|
||||
// once with "version", bootstrapping the binary build and per-hook
|
||||
// wrappers. Called from each repo's misc/install-git-hooks.go.
|
||||
// wrappers. Called from each repo's misc/add-git-hooks.go.
|
||||
func Install() error {
|
||||
hookDir, err := findHookDir()
|
||||
if err != nil {
|
||||
@@ -74,7 +74,7 @@ func WriteHooks(hooks []string) error {
|
||||
switch {
|
||||
case want[name] && !mine:
|
||||
return fmt.Errorf("%s exists and is not a ts-git-hook wrapper; "+
|
||||
"move your hook to %s.local (it will be chained after the wrapper) or delete it, then re-run: ./tool/go run ./misc/install-git-hooks.go",
|
||||
"move your hook to %s.local (it will be chained after the wrapper) or delete it, then re-run: ./tool/go run ./misc/add-git-hooks.go",
|
||||
path, name)
|
||||
case !want[name] && mine:
|
||||
// Stale wrapper from a prior version (e.g. a hook we used
|
||||
|
||||
Reference in New Issue
Block a user