Apply code review changes

Rename "cmd*" var to "bin*" in the parallels-specific block
pull/8259/head
Mikhail Zholobov 2020-05-23 23:08:10 +02:00
parent c22a92f9bf
commit 2b8bac695e
No known key found for this signature in database
GPG Key ID: 467E2D8B15AE6DB3
1 changed files with 6 additions and 6 deletions

View File

@ -73,14 +73,14 @@ func HostIP(host *host.Host) (net.IP, error) {
ip := re.FindStringSubmatch(string(ipList))[1]
return net.ParseIP(ip), nil
case driver.Parallels:
cmd := "prlsrvctl"
var cmdPath string
if fullPath, err := exec.LookPath(cmd); err != nil {
cmdPath = fullPath
bin := "prlsrvctl"
var binPath string
if fullPath, err := exec.LookPath(bin); err != nil {
binPath = fullPath
} else {
cmdPath = cmd
binPath = bin
}
out, err := exec.Command(cmdPath, "net", "info", "Shared").Output()
out, err := exec.Command(binPath, "net", "info", "Shared").Output()
if err != nil {
return []byte{}, errors.Wrap(err, "Error reading the info of Parallels Shared network interface")
}