trying to get 'apt install' to work

This commit is contained in:
Jeff Carr 2025-03-23 18:47:39 -05:00
parent a02078081e
commit 611025c946
1 changed files with 3 additions and 1 deletions

View File

@ -76,11 +76,13 @@ func sendMachine(s string) error {
} }
os.Exit(0) os.Exit(0)
} else if strings.HasPrefix(line, "apt install") { } else if strings.HasPrefix(line, "apt install") {
log.Info("machine install", line) log.Info("Got to apt install", line)
parts := strings.Fields(line) parts := strings.Fields(line)
if len(parts) > 1 { if len(parts) > 1 {
cmd := []string{"apt", "update"} cmd := []string{"apt", "update"}
cmd = append(cmd, parts[1:]...) cmd = append(cmd, parts[1:]...)
log.Info("Got to parts =", parts)
log.Info("Got to cmd =", cmd)
shell.RunRealtime(cmd) shell.RunRealtime(cmd)
} else { } else {
log.Info("nothing to install for line:", line) log.Info("nothing to install for line:", line)