[libvirt PATCH 09/12] ci: jobs.sh: run_cmd: Use eval to run commands

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We tried to evade usage of eval in commit 6214ae55f6a, but trying to
use I/O redirections with a command doesn't have the desired effect,
because when Shell eats the redirection it is applied to anything
inside the run_cmd function, even the print command we use for
debugging purposes. In order to print all commands and use the
redirection only on the actual execution of a given command, let's
adopt eval on "$@" and allow passing redirections as strings later on.
Future patches will demonstrate this.

Signed-off-by: Erik Skultety <eskultet@xxxxxxxxxx>
---
 ci/jobs.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ci/jobs.sh b/ci/jobs.sh
index f4e83dda2e..3a89cb1a69 100644
--- a/ci/jobs.sh
+++ b/ci/jobs.sh
@@ -15,7 +15,7 @@ fi
 GIT_ROOT="$(git rev-parse --show-toplevel)"
 run_cmd() {
     printf "\e[32m[RUN COMMAND]: '%s'\e[0m\n" "$*"
-    "$@"
+    eval "$@"
 }
 
 run_meson_setup() {
@@ -70,7 +70,7 @@ run_rpmbuild() {
     run_cmd rpmbuild \
                 --clean \
                 --nodeps \
-                --define "_without_mingw 1" \
+                --define "'_without_mingw 1'" \
                 -ta build/meson-dist/libvirt-*.tar.xz
 }
 
-- 
2.41.0




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux