1 https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3774
3 From e5d9d3657d67e49c518bf414c47f335c080cd20d Mon Sep 17 00:00:00 2001
4 From: Elan Ruusamäe <glen@delfi.ee>
5 Date: Sun, 17 Apr 2016 18:11:28 +0000
6 Subject: [PATCH] update gitlab shell secret file also when it is empty
9 config/initializers/gitlab_shell_secret_token.rb | 2 +-
10 1 file changed, 1 insertion(+), 1 deletion(-)
12 diff --git a/config/initializers/gitlab_shell_secret_token.rb b/config/initializers/gitlab_shell_secret_token.rb
13 index 751fcce..f086b2a 100644
14 --- a/config/initializers/gitlab_shell_secret_token.rb
15 +++ b/config/initializers/gitlab_shell_secret_token.rb
16 @@ -7,7 +7,7 @@ require 'securerandom'
18 secret_file = Gitlab.config.gitlab_shell.secret_file
20 -unless File.exist? secret_file
21 +unless File.size? secret_file
22 # Generate a new token of 16 random hexadecimal characters and store it in secret_file.
23 token = SecureRandom.hex(16)
24 File.write(secret_file, token)