fix(run.go): fixed map

This commit is contained in:
Paul Fey 2025-02-27 18:45:26 +01:00
parent 0431866e7c
commit ca47bff951

4
run.go
View file

@ -10,7 +10,7 @@ import (
"path/filepath" "path/filepath"
) )
func runMap(conn net.Conn, instance string, objmap map[string]string) (int, error) { func runMap(conn net.Conn, instance string, objmap map[string]interface{}) (int, error) {
program, has := objmap["package"] program, has := objmap["package"]
if !has { if !has {
return 0, errors.New("a package is required") return 0, errors.New("a package is required")
@ -27,7 +27,7 @@ func runMap(conn net.Conn, instance string, objmap map[string]string) (int, erro
if !has { if !has {
return 0, errors.New("a workdir is required") return 0, errors.New("a workdir is required")
} }
return run(conn, instance, program, arguments, target, workdir) return run(conn, instance, program.(string), arguments.(string), target.(string), workdir.(string))
} }
func run(conn net.Conn, instance string, program string, arguments string, target string, workdir string) (int, error) { func run(conn net.Conn, instance string, program string, arguments string, target string, workdir string) (int, error) {