summaryrefslogtreecommitdiff
path: root/debug.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2019-05-25 16:00:33 -0700
committerJeff Carr <[email protected]>2019-05-25 16:00:33 -0700
commit8fe85f0af271c8cbfa4e5735f7136923dab357f8 (patch)
treef48b4bfcbbd543410129409a5fd1abf900d14b25 /debug.go
parent7b601a8e689ab4bc657f730f23c2c785b2fe7846 (diff)
pass the VM to the buttons in the VM tab
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'debug.go')
-rw-r--r--debug.go11
1 files changed, 9 insertions, 2 deletions
diff --git a/debug.go b/debug.go
index 5d8f0aa..4389bde 100644
--- a/debug.go
+++ b/debug.go
@@ -79,9 +79,14 @@ func addDebuggingButtons(vbox *ui.Box, custom func(*ButtonMap)) {
func runPingClick(b *ButtonMap) {
log.Println("runPingClick START")
+ log.Println("runTestExecClick b.VM", b.VM)
+ hostname := "localhost"
+ if (b.VM != nil) {
+ hostname = b.VM.Hostname
+ }
spew.Dump(b)
var tmp []string
- tmp = append(tmp, "xterm", "-e", "ping localhost")
+ tmp = append(tmp, "xterm", "-e", "ping " + hostname + ";bash")
runCommand(tmp)
log.Println("runPingClick END")
}
@@ -91,7 +96,7 @@ func runTestExecClick(b *ButtonMap) {
if runtime.GOOS == "linux" {
go runSimpleCommand("xterm -report-fonts")
} else if runtime.GOOS == "windows" {
- go runSimpleCommand("cmd.exe")
+ go runSimpleCommand("mintty.exe")
} else {
go runSimpleCommand("xterm")
}
@@ -115,6 +120,8 @@ func runCommand(cmdArgs []string) {
process.Start()
log.Println("runXterm process.Wait()")
process.Wait()
+ log.Println("runXterm NEED TO CHECK THE TIME HERE TO SEE IF THIS WORKED")
+ log.Println("runXterm OTHERWISE INFORM THE USER")
log.Println("runXterm END")
log.Println("runXterm END")
log.Println("runXterm END")