Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfeistel <6742251-feistel@users.noreply.gitlab.com>2022-06-22 23:02:13 +0300
committerfeistel <6742251-feistel@users.noreply.gitlab.com>2022-06-22 23:02:37 +0300
commit52df551238adf4bbaa13afc33dba1a5089b8a964 (patch)
tree815cdba68dcbac4f841d03c64dff0c605543270d /main.go
parent3fb57b7a2989b50ca4c9543ec86c1f5751cf1a41 (diff)
Avoid chdir inside RootDir if disk is not enabled
Diffstat (limited to 'main.go')
-rw-r--r--main.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/main.go b/main.go
index 6311a6d5..f8ed7371 100644
--- a/main.go
+++ b/main.go
@@ -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()