Skip to content

Conversation

@Martchus
Copy link
Contributor

  • Remove the -quiet parameter
  • Use run_cmd_with_log_return_error for logging the command output in the error case
  • Improve error messages in run_cmd_with_log_return_error to include the program name so the error message is also useful on its own (without the prior Running cmd: … message)
  • Make run_cmd_with_log_return_error return the error message so it can be passed as reason when using it to run optipng
  • See https://progress.opensuse.org/issues/190920

@Martchus
Copy link
Contributor Author

Martchus commented Oct 24, 2025

It looks like using the IPC run-based run_cmd_with_log_return_error cannot be used here - at least not without further modification. The problem is that when run_cmd_with_log_return_error is used after call_driver (like we do in fullstack tests) the $? variable doesn't return the correct value. And also the return value of IPC::Run::run(…) is false when it should be true.

Unless somebody has an idea how to fix this I probably would have to extend the current custom code for starting optipng to make this work. Maybe it would be similar to how I implemented it in the scripts repo but here we would also need to cover stderr (via e.g. 2>&1).

* Remove the `-quiet` parameter
* Use `run_cmd_with_log_return_error` for logging the command output in the
  error case
* Improve error messages in `run_cmd_with_log_return_error` to include the
  program name so the error message is also useful on its own (without the
  prior `Running cmd: …` message)
* Make `run_cmd_with_log_return_error` return the error message so it can
  be passed as reason when using it to run `optipng`
* See https://progress.opensuse.org/issues/190920
@mergify
Copy link
Contributor

mergify bot commented Oct 28, 2025

This pull request is now in conflicts. Could you fix it? 🙏

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.

1 participant