diff --git a/api/api.go b/api/api.go index 0008a53..0ee522a 100644 --- a/api/api.go +++ b/api/api.go @@ -36,7 +36,6 @@ func Request(body interface{}, zoneName string, serverId string) error { scv := &config.Scv{} current, _ := user.Current() dir := filepath.Join(current.HomeDir, "scv.json") - logger.Debug(dir) config.Load(scv, dir) if scv.AccessToken == "" || scv.AccessTokenSecret == "" { diff --git a/cmd/cmd.go b/cmd/cmd.go index f07b10f..b17b5ca 100644 --- a/cmd/cmd.go +++ b/cmd/cmd.go @@ -4,6 +4,7 @@ import ( "os/exec" "github.com/blp1526/scv/api" + "github.com/blp1526/scv/logger" ) func Run(zoneName string, serverName string) error { @@ -14,10 +15,11 @@ func Run(zoneName string, serverName string) error { } vncPath := vncPath(*body) + logger.Debug("vncPath is " + vncPath) err = exec.Command("open", vncPath).Run() return err } func vncPath(body api.Body) string { - return "// vnc://:" + body.Password + "@" + body.Host + ":" + body.Port + return "vnc://:" + body.Password + "@" + body.Host + ":" + body.Port } diff --git a/config/config.go b/config/config.go index a5af231..ba6dc0e 100644 --- a/config/config.go +++ b/config/config.go @@ -24,8 +24,5 @@ func Load(scv *Scv, filePath string) error { } err = json.Unmarshal(bytes, scv) - if err != nil { - return err - } return err }