mirror of
https://github.com/FiloSottile/mkcert.git
synced 2025-10-13 16:31:41 +08:00
java: don't try to run keytool during check if it's not available (#90)
If JAVA_HOME isn't set then keytoolPath has an invalid path. This means checkJava() fails and doesn't tell the problem clearly to the user. Fixes #88
This commit is contained in:

committed by
Filippo Valsorda

parent
afbc420fa0
commit
438ae98b1c
@@ -58,6 +58,10 @@ func init() {
|
||||
}
|
||||
|
||||
func (m *mkcert) checkJava() bool {
|
||||
if !hasKeytool {
|
||||
return false
|
||||
}
|
||||
|
||||
// exists returns true if the given x509.Certificate's fingerprint
|
||||
// is in the keytool -list output
|
||||
exists := func(c *x509.Certificate, h hash.Hash, keytoolOutput []byte) bool {
|
||||
|
Reference in New Issue
Block a user