test/system: Simplify checking if the image exists or not
Bats' 'run' helper is not necessary to merely check if a command succeeded or not [1]. In this case, it's idiomatic to use the command as the condition for an 'if' branch. [1] https://bats-core.readthedocs.io/en/stable/writing-tests.html https://github.com/containers/toolbox/pull/1378
This commit is contained in:
parent
9f85e13da9
commit
0d43d22b5b
1 changed files with 1 additions and 2 deletions
|
@ -334,8 +334,7 @@ function pull_distro_image() {
|
|||
fi
|
||||
|
||||
# No need to copy if the image is already available in Podman
|
||||
run "$PODMAN" image exists "${image}"
|
||||
if [[ "$status" -eq 0 ]]; then
|
||||
if "$PODMAN" image exists "${image}"; then
|
||||
return
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue