diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2022-03-17 12:26:55 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2022-03-21 17:50:51 +0300 |
commit | 731b2bb594d50d0f8beb4ae8c73dfe3986395605 (patch) | |
tree | 2e34892b5ff481b11b47485465910fa3efa0810f | |
parent | 82f34c7f355d69a507f83993580676b7c21ff147 (diff) |
git: Migrate hook directory to use runtime directory
Migrate the temporary hook directories set up by the Git command factory
to be created in the runtime directory.
Changelog: changed
-rw-r--r-- | internal/git/command_factory.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/git/command_factory.go b/internal/git/command_factory.go index a8a9bdbf9..056b8b170 100644 --- a/internal/git/command_factory.go +++ b/internal/git/command_factory.go @@ -266,7 +266,7 @@ func setupHookDirectories(cfg config.Cfg, factoryCfg execCommandFactoryConfig) ( // This sets up the new hook location. Hooks now live in a temporary directory, where all // hooks are symlinks to the `gitaly-hooks` binary. - tempHooksPath, err := os.MkdirTemp("", "gitaly-hooks-") + tempHooksPath, err := os.MkdirTemp(cfg.RuntimeDir, "hooks-*.d") if err != nil { return hookDirectories{}, nil, fmt.Errorf("creating temporary hooks directory: %w", err) } |