Skip to content
Permalink
Browse files

Swap exec.Command("hostname") for os.Hostname() (#137)

  • Loading branch information...
crawshaw authored and FiloSottile committed Feb 15, 2019
1 parent 9e95635 commit c03e3ceaca0490e2c8f9ae3cdbe3e9fac5f7df37
Showing with 2 additions and 3 deletions.
  1. +2 −3 cert.go
@@ -20,7 +20,6 @@ import (
"math/big"
"net"
"os"
"os/exec"
"os/user"
"path/filepath"
"regexp"
@@ -38,8 +37,8 @@ func init() {
if u != nil {
userAndHostname = u.Username + "@"
}
out, _ := exec.Command("hostname").Output()
userAndHostname += strings.TrimSpace(string(out))
hostname, _ := os.Hostname()
userAndHostname += hostname
}

func (m *mkcert) makeCert(hosts []string) {

0 comments on commit c03e3ce

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.