From 3585119c3758f9cfd85adfdba2824172fe48417e Mon Sep 17 00:00:00 2001 From: Roman Vanicek Date: Thu, 18 Apr 2024 09:33:53 +0200 Subject: [PATCH] Fix passing multiple values through --container-options --- plugin.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugin.go b/plugin.go index 2a41ff6..7289e89 100644 --- a/plugin.go +++ b/plugin.go @@ -115,10 +115,11 @@ func (p Plugin) Exec() error { if selinux.GetEnabled() { bindModifiers = ":z" } - cmdArgs = append(cmdArgs, "--container-options", fmt.Sprintf("--volume=%s:%s%s", hostWorkDirPath, guestWorkDirPath, bindModifiers)) + opt := fmt.Sprintf("--volume=%s:%s%s", hostWorkDirPath, guestWorkDirPath, bindModifiers) if p.Action.Kvm { - cmdArgs = append(cmdArgs, "--volume=/dev/kvm:/dev/kvm") + opt = opt + " --volume=/dev/kvm:/dev/kvm" } + cmdArgs = append(cmdArgs, "--container-options", opt) } cmd := exec.Command("act", cmdArgs...)