feat(install.go): wrapped bins now use the bnd-run command

This commit is contained in:
Paul Fey 2025-03-05 14:00:26 +01:00
parent df56747d6d
commit 52c7d05e76

View file

@ -165,9 +165,9 @@ func install_bin(instance string, path string, target string, program string) er
}
}
bnd_send_cmd_path, err := filepath.Abs(filepath.Join(instance, "exec", "bin", "bnd-send-cmd"))
bnd_run_path, err := filepath.Abs(filepath.Join(instance, "exec", "bin", "bnd-run"))
contents := "#!/usr/bin/env bash\n" + bnd_send_cmd_path + " " + instance + " \"{\\\"command\\\": \\\"run\\\", \\\"package\\\": \\\"" + program + "\\\", \\\"target\\\": \\\"" + target + "\\\", \\\"workdir\\\": \\\"$PWD\\\", \\\"arguments\\\": \\\"$@\\\"}\"\n"
contents := "#!/usr/bin/env bash\nexec " + bnd_run_path + " -i " + instance + " -t " + target + " -w $PWD " + program + " $@\n"
err = os.WriteFile(bin_path, []byte(contents), 0755)
if err != nil {