diff --git a/vars/sonarExecuteScan.groovy b/vars/sonarExecuteScan.groovy index b5580a27d..c879f8125 100644 --- a/vars/sonarExecuteScan.groovy +++ b/vars/sonarExecuteScan.groovy @@ -190,7 +190,9 @@ void call(Map parameters = [:]) { script: script, dockerImage: configuration.dockerImage ){ - unstash 'git' + if(!script.fileExists('.git')) { + utils.unstash('git') + } worker(configuration) } }