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

"transactional-update run" does not propagate command error exit codes to host #134

Open
ipetrov117 opened this issue Oct 16, 2024 · 0 comments · May be fixed by #135
Open

"transactional-update run" does not propagate command error exit codes to host #134

ipetrov117 opened this issue Oct 16, 2024 · 0 comments · May be fixed by #135

Comments

@ipetrov117
Copy link

Currently commands executed through transactional-update run do not have their non-zero exit codes propagated to the host.

This results in transactional-update run always returning a zero exit code even for obviously failing commands.

Example:

# transactional-update run ls /foo/bar
Checking for newer version.
transactional-update 4.8.1 started
Options: run ls /foo/bar
Separate /var detected.
2024-10-16 08:08:56 tukit 4.8.1 started
2024-10-16 08:08:56 Options: -c4 open 
2024-10-16 08:08:57 Using snapshot 4 as base for new snapshot 15.
2024-10-16 08:08:57 /var/lib/overlay/4/etc
2024-10-16 08:08:57 Syncing /etc of previous snapshot 3 as base into new snapshot "/.snapshots/15/snapshot"
2024-10-16 08:08:57 SELinux is enabled.
ID: 15
2024-10-16 08:08:58 Transaction completed.
2024-10-16 08:08:58 tukit 4.8.1 started
2024-10-16 08:08:58 Options: call 15 ls /foo/bar 
2024-10-16 08:08:58 Executing `ls /foo/bar`:
ls: cannot access '/foo/bar': No such file or directory
2024-10-16 08:08:58 Application returned with exit status 2.
2024-10-16 08:08:58 tukit 4.8.1 started
2024-10-16 08:08:58 Options: close 15 
2024-10-16 08:09:00 New default snapshot is #15 (/.snapshots/15/snapshot).
2024-10-16 08:09:00 Transaction completed.
...
New default snapshot is #15 (/.snapshots/15/snapshot).
transactional-update finished

# echo $?
0

Furthermore, this also creates a new snapshot, when it should in fact discard the snapshot.

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