mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #49736 from mattLLVW/fix-file-touch
Fix test opts in append, prepend states/file.py
This commit is contained in:
commit
8fe8aac8f9
1 changed files with 6 additions and 2 deletions
|
@ -4921,7 +4921,9 @@ def append(name,
|
|||
check_res, check_msg = _check_file(name)
|
||||
if not check_res:
|
||||
# Try to create the file
|
||||
touch(name, makedirs=makedirs)
|
||||
touch_ret = touch(name, makedirs=makedirs)
|
||||
if __opts__['test']:
|
||||
return touch_ret
|
||||
retry_res, retry_msg = _check_file(name)
|
||||
if not retry_res:
|
||||
return _error(ret, check_msg)
|
||||
|
@ -5202,7 +5204,9 @@ def prepend(name,
|
|||
check_res, check_msg = _check_file(name)
|
||||
if not check_res:
|
||||
# Try to create the file
|
||||
touch(name, makedirs=makedirs)
|
||||
touch_ret = touch(name, makedirs=makedirs)
|
||||
if __opts__['test']:
|
||||
return touch_ret
|
||||
retry_res, retry_msg = _check_file(name)
|
||||
if not retry_res:
|
||||
return _error(ret, check_msg)
|
||||
|
|
Loading…
Add table
Reference in a new issue