diff options
| author | Elan Ruusamäe <glen@delfi.ee> | 2016-04-17 18:11:28 +0000 |
|---|---|---|
| committer | Elan Ruusamäe <glen@delfi.ee> | 2016-09-13 09:38:51 +0300 |
| commit | ab43e9c1f9ad91f9ac2d8e648f747cd0873e4f69 (patch) | |
| tree | 2a3eb8106adca64ffce638b980d5fec110116141 /lib | |
| parent | 6b88cc6469a08db12aee8f5b0f8ef581bd491265 (diff) | |
| download | gitlab-ce-ab43e9c1f9ad91f9ac2d8e648f747cd0873e4f69.tar.gz | |
update gitlab shell secret file also when it is empty
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/gitlab/backend/shell.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/backend/shell.rb b/lib/gitlab/backend/shell.rb index 839a4fa30d5..c412249a01e 100644 --- a/lib/gitlab/backend/shell.rb +++ b/lib/gitlab/backend/shell.rb @@ -195,7 +195,7 @@ module Gitlab # Create (if necessary) and link the secret token file def generate_and_link_secret_token secret_file = Gitlab.config.gitlab_shell.secret_file - unless File.exist? secret_file + unless File.size?(secret_file) # Generate a new token of 16 random hexadecimal characters and store it in secret_file. token = SecureRandom.hex(16) File.write(secret_file, token) |
