Skip to content

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

Open
@ipetrov117

Description

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions