mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Adding check for ignore_if_missing param when calling _check_file.
This commit is contained in:
parent
801ff28053
commit
1a78878b47
1 changed files with 4 additions and 1 deletions
|
@ -3358,7 +3358,10 @@ def replace(name,
|
|||
|
||||
check_res, check_msg = _check_file(name)
|
||||
if not check_res:
|
||||
return _error(ret, check_msg)
|
||||
if ignore_if_missing and 'file not found' in check_msg:
|
||||
pass
|
||||
else:
|
||||
return _error(ret, check_msg)
|
||||
|
||||
changes = __salt__['file.replace'](name,
|
||||
pattern,
|
||||
|
|
Loading…
Add table
Reference in a new issue