mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Merge pull request #27180 from tankywoo/file-copy-result-true-in-test
file copy ret result True if no change in test mode
This commit is contained in:
commit
d988aa2145
@ -3866,11 +3866,16 @@ def copy(
|
||||
)
|
||||
|
||||
if __opts__['test']:
|
||||
ret['comment'] = 'File "{0}" is set to be copied to "{1}"'.format(
|
||||
source,
|
||||
name
|
||||
)
|
||||
ret['result'] = None
|
||||
if changed:
|
||||
ret['comment'] = 'File "{0}" is set to be copied to "{1}"'.format(
|
||||
source,
|
||||
name
|
||||
)
|
||||
ret['result'] = None
|
||||
else:
|
||||
ret['comment'] = ('The target file "{0}" exists and will not be '
|
||||
'overwritten'.format(name))
|
||||
ret['result'] = True
|
||||
return ret
|
||||
|
||||
if not changed:
|
||||
|
Loading…
Reference in New Issue
Block a user