Set default for RPI command to return help info

This commit is contained in:
Terence Boldt 2021-12-28 16:26:59 -05:00
parent 285d23af55
commit cc2aa9954e

View File

@ -32,6 +32,9 @@ func ExecCommand() {
linuxCommand = strings.ToLower(linuxCommand) linuxCommand = strings.ToLower(linuxCommand)
} }
linuxCommand = strings.Trim(linuxCommand, " ") linuxCommand = strings.Trim(linuxCommand, " ")
if linuxCommand == "" {
linuxCommand = "a2help"
}
fmt.Printf("Command to run: %s\n", linuxCommand) fmt.Printf("Command to run: %s\n", linuxCommand)
if strings.HasPrefix(linuxCommand, "cd ") { if strings.HasPrefix(linuxCommand, "cd ") {
workingDirectory = strings.Replace(linuxCommand, "cd ", "", 1) workingDirectory = strings.Replace(linuxCommand, "cd ", "", 1)