Skip to content

Controller: Allow checking the return status of commands

Right now you can't, which is awkward and makes life difficult for distros wishing to use the custom page infrastructure to do complex things like enable optional package repos and other tasks where it's nice to be able to see if it succeeded or failed.

So now you can, by passing an optional JavaScript callback function to runCommand(). It can get the return code and stdout/stderr output.

This entails porting away from CommandLauncherJob because it lacks the ability to monitor a process for its ultimate completion status. As such, we also need to remove the runCommand() overload that allowed passing in a desktop file for launch feedback purposes, as that only worked with the KJob infrastructure. This should be fine as nothing internally was using it, and anyone external who wanted to use it to launch anything with a desktop file can use launchApp() instead.

Edited by Nate Graham

Merge request reports