Merge pull request #25737 from rallytime/bp-25608

Back-port #25608 to 2015.5
This commit is contained in:
Thomas S Hatch 2015-07-27 10:08:18 -06:00
commit 05fbfe64e9

View file

@ -353,6 +353,13 @@ def latest(name,
if os.path.isdir(target):
# git clone is required, target exists but force is turned on
if force:
if __opts__['test']:
return _neutral_test(
ret,
'Repository {0} is about to be cloned to {1}.'
'Since force option is in use, deleting.'.format(
name, target))
log.debug(('target {0} found, but not a git repository. Since '
'force option is in use, deleting.').format(target))
if os.path.islink(target):