A: energy command line, Set energy framework development environment

This commit is contained in:
yanghy 2023-07-21 14:03:33 +08:00
parent 8f05acb860
commit 37a3da8f26

View File

@ -52,6 +52,7 @@ func setEnergyHomeEnv(key, value string) {
cmd.MessageCallback = func(s []byte, e error) { cmd.MessageCallback = func(s []byte, e error) {
fmt.Println("CMD", s, " error", e) fmt.Println("CMD", s, " error", e)
} }
defer cmd.Close()
if isWindows { if isWindows {
var args = []string{"/c", "setx", key, value} var args = []string{"/c", "setx", key, value}
cmd.Command("cmd.exe", args...) cmd.Command("cmd.exe", args...)
@ -113,5 +114,4 @@ func setEnergyHomeEnv(key, value string) {
} }
} }
} }
cmd.Close()
} }