diff options
Diffstat (limited to 'lib/gitlab/ci/config/external/file/local.rb')
-rw-r--r-- | lib/gitlab/ci/config/external/file/local.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/gitlab/ci/config/external/file/local.rb b/lib/gitlab/ci/config/external/file/local.rb index 229a06451e8..cac321ec4a6 100644 --- a/lib/gitlab/ci/config/external/file/local.rb +++ b/lib/gitlab/ci/config/external/file/local.rb @@ -21,7 +21,9 @@ module Gitlab private def validate_content! - if content.nil? + if context.project&.repository.nil? + errors.push("Local file `#{location}` does not have project!") + elsif content.nil? errors.push("Local file `#{location}` does not exist!") elsif content.blank? errors.push("Local file `#{location}` is empty!") |