mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +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']:
|
if __opts__['test']:
|
||||||
ret['comment'] = 'File "{0}" is set to be copied to "{1}"'.format(
|
if changed:
|
||||||
source,
|
ret['comment'] = 'File "{0}" is set to be copied to "{1}"'.format(
|
||||||
name
|
source,
|
||||||
)
|
name
|
||||||
ret['result'] = None
|
)
|
||||||
|
ret['result'] = None
|
||||||
|
else:
|
||||||
|
ret['comment'] = ('The target file "{0}" exists and will not be '
|
||||||
|
'overwritten'.format(name))
|
||||||
|
ret['result'] = True
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
if not changed:
|
if not changed:
|
||||||
|
Loading…
Reference in New Issue
Block a user