Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail when "transactional-update run" command returns non-zero exit code #135

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ipetrov117
Copy link

closes: #134

Example with suggested changes:

# transactional-update run ls /foo/bar
Checking for newer version.
transactional-update  started
Options: run ls /foo/bar
Separate /var detected.
2024-10-16 08:29:50 tukit 4.8.1 started
2024-10-16 08:29:50 Options: -c4 open 
2024-10-16 08:29:51 Using snapshot 4 as base for new snapshot 16.
2024-10-16 08:29:51 /var/lib/overlay/4/etc
2024-10-16 08:29:51 Syncing /etc of previous snapshot 3 as base into new snapshot "/.snapshots/16/snapshot"
2024-10-16 08:29:51 SELinux is enabled.
ID: 16
2024-10-16 08:29:52 Transaction completed.
2024-10-16 08:29:52 tukit 4.8.1 started
2024-10-16 08:29:52 Options: call 16 ls /foo/bar 
2024-10-16 08:29:52 Executing `ls /foo/bar`:
ls: cannot access '/foo/bar': No such file or directory
2024-10-16 08:29:52 Application returned with exit status 2.
ERROR: ls /foo/bar failed!
Removing snapshot #16...
2024-10-16 08:29:52 tukit 4.8.1 started
2024-10-16 08:29:52 Options: abort 16 
2024-10-16 08:29:53 Discarding snapshot 16.
2024-10-16 08:29:54 Transaction completed.
transactional-update finished

# echo $?
1

Note: For consistency with the other code base the EXITCODE is always set to 1 when a RUN_CMD fails.

Feel free to close this if I have missed something and this is the intended behaviour.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"transactional-update run" does not propagate command error exit codes to host
1 participant