diff options
author | Jaime Martinez <jmartinez@gitlab.com> | 2022-06-27 04:38:03 +0300 |
---|---|---|
committer | Jaime Martinez <jmartinez@gitlab.com> | 2022-06-27 04:38:03 +0300 |
commit | 9269d70e6a28686038ef42f0e4dcb519536eae8d (patch) | |
tree | 61f81a43b1ca61b852c067e85872bd6d272e9d02 | |
parent | 947cad46a79aa89323fd10f6d9f2bc16c1f6741d (diff) | |
parent | 52df551238adf4bbaa13afc33dba1a5089b8a964 (diff) |
Merge branch 'feat/only-chdir-if-disk' into 'master'
feat: avoid chdir inside RootDir if disk is not enabled
See merge request gitlab-org/gitlab-pages!798
-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() |