Removed error code logic and replaced with library function (#39)

* Removed error code logic and replaced with library function

* Added the gosecignore comment to prevent gosec failing
This commit is contained in:
Amrit K Kandola
2019-12-03 16:13:36 +00:00
committed by GitHub Enterprise
parent 5449622d2a
commit b20761cea0
4 changed files with 13 additions and 29 deletions

View File

@@ -73,7 +73,8 @@ func startWebServer(keystore, keystorepw, p12TrustStoreRef string) error {
cmd.SysProcAttr = &syscall.SysProcAttr{}
cmd.SysProcAttr.Credential = &syscall.Credential{Uid: uint32(uid), Gid: uint32(gid)}
}
out, rc, err := command.RunCmd(cmd)
out, err := cmd.CombinedOutput()
rc := cmd.ProcessState.ExitCode()
if err != nil {
log.Printf("Error %v starting web server: %v", rc, string(out))
return err