Description
While trying to use cp to copy a file to /etc (since file.copy doesn't support privilege elevation at this point) comtrya reports a completed execution, no errors.
If you run it in trace mode however, you see that the command failed with exit code 1,
Steps to reproduce
actions:
- action: command.run
command: cp
args:
- -f
- manifests/tools/zsh/files/zshenv
- /etc/zsh/
The above action tries to copy a file into /etc without sudo.
Trace will show:
TRACE execute:{manifest="manifests.etc"}:{action=command.run}: exit code: 1
TRACE execute:{manifest="manifests.etc"}:{action=command.run}: stdout:
TRACE execute:{manifest="manifests.etc"}:{action=command.run}: stderr: cp: cannot remove '/etc/zsh/zshenv': Permission denied
INFO execute:{manifest="manifests.etc"}: Completed
Expected behaviour
Visible error
Environment
- OS: manjaro
- Version: 0.8.3