Skip to content

Commit

Permalink
Fix empty string
Browse files Browse the repository at this point in the history
  • Loading branch information
rockyluke committed Sep 26, 2018
1 parent 4686e3d commit 1f1a682
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,7 @@ func getJavawsArgs(waitFlag bool) string {
strings.Contains(string(slurp[:]), "1.8") {
if waitFlag {
javawsArgs = "-wait"
} else {
javawsArgs = ""
}

}

return javawsArgs
Expand Down Expand Up @@ -196,13 +193,13 @@ func main() {

// Launch it!
log.Printf("Launching KVM session with %s", filename)
if err := exec.Command(*_javaws, getJavawsArgs(*_wait), filename, "-nosecurity", "-noupdate", "-Xnofork").Run(); err != nil {
cmd := exec.Command(*_javaws, getJavawsArgs(*_wait), filename, "-nosecurity", "-noupdate", "-Xnofork")
if err := cmd.Run(); err != nil {
os.Remove(filename)
log.Fatalf("Unable to launch DRAC (%s), from file %s", err, filename)
}

// Give javaws a few seconds to start & read the jnlp
time.Sleep(time.Duration(*_delay) * time.Second)
}

// EOF

0 comments on commit 1f1a682

Please sign in to comment.