kiwi-el8/.github/workflows
Dan Čermák 48817a6441
Refactor Command class
Command.run() currently has a bit of a confusing behavior: if raise_on_error is
False and the executable is not found, then a weird CommandT is returned (return
code is -1 and stdout+stderr is None). This makes it possible to hanlde command
not found errors separately, but it makes that needlessly verbose. So instead,
let's just return None in *this* special case.

That in turn uncovered, that in most cases when we set `raise_on_error=True`, we
actually want an error if the command is not present but no error if the command
fails to execute (e.g. because it returns -1 if you run `$cmd --version`). Hence we
introduce the flag `raise_on_command_not_found`, which causes an exception to
be raised if the command is not found. This makes it independent of the
`raise_on_error` flag.

Additionally, we add a small optimization: if command starts with /, then we
assume it's a full path and we omit the call to which (and just check whether it
exists).

Co-authored-by: Marcus Schäfer <marcus.schaefer@gmail.com>
2024-02-19 16:33:24 +01:00
..
ci-code-style.yml Move workflow runs to main branch 2024-01-09 15:35:22 +01:00
ci-config-functions.yml Move workflow runs to main branch 2024-01-09 15:35:22 +01:00
ci-differential-shellcheck.yml Move workflow runs to main branch 2024-01-09 15:35:22 +01:00
ci-documentation.yml Move workflow runs to main branch 2024-01-09 15:35:22 +01:00
ci-kiwi-9-compliant.yml Allow empty cherry-picks for compliance test 2024-02-19 13:58:17 +01:00
ci-publish-pages.yml Update GitHub Actions "actions/*" part 2023-08-10 14:34:16 +02:00
ci-publish-to-pypi.yml Update pypi release to trusted workflow 2023-10-08 18:19:47 +02:00
ci-units-types.yml Refactor Command class 2024-02-19 16:33:24 +01:00
ci-update-build-tests.yml Move workflow runs to main branch 2024-01-09 15:35:22 +01:00