()
| 92 | } |
| 93 | |
| 94 | func (m *mkcert) uninstallJava() { |
| 95 | args := []string{ |
| 96 | "-delete", |
| 97 | "-alias", m.caUniqueName(), |
| 98 | "-keystore", cacertsPath, |
| 99 | "-storepass", storePass, |
| 100 | } |
| 101 | out, err := execKeytool(exec.Command(keytoolPath, args...)) |
| 102 | if bytes.Contains(out, []byte("does not exist")) { |
| 103 | return // cert didn't exist |
| 104 | } |
| 105 | fatalIfCmdErr(err, "keytool -delete", out) |
| 106 | } |
| 107 | |
| 108 | // execKeytool will execute a "keytool" command and if needed re-execute |
| 109 | // the command with commandWithSudo to work around file permissions. |
no test coverage detected