diff options
author | feistel <6742251-feistel@users.noreply.gitlab.com> | 2022-06-22 23:02:13 +0300 |
---|---|---|
committer | feistel <6742251-feistel@users.noreply.gitlab.com> | 2022-06-22 23:02:37 +0300 |
commit | 52df551238adf4bbaa13afc33dba1a5089b8a964 (patch) | |
tree | 815cdba68dcbac4f841d03c64dff0c605543270d /main.go | |
parent | 3fb57b7a2989b50ca4c9543ec86c1f5751cf1a41 (diff) |
Avoid chdir inside RootDir if disk is not enabled
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -71,8 +71,10 @@ func appMain() error { }).Info("GitLab Pages") log.Info("URL: https://gitlab.com/gitlab-org/gitlab-pages") - if err := os.Chdir(config.General.RootDir); err != nil { - return fmt.Errorf("could not change directory into pagesRoot: %w", err) + if config.GitLab.EnableDisk { + if err := os.Chdir(config.General.RootDir); err != nil { + return fmt.Errorf("could not change directory into pagesRoot: %w", err) + } } fips.Check() |