From 8dba1e8e32c479b676080c790f26f825522f72a1 Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Fri, 21 Apr 2017 19:34:32 +0800 Subject: [PATCH] fix: quick fix. (#63) --- plugin.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.go b/plugin.go index 6be2781..d4ed728 100644 --- a/plugin.go +++ b/plugin.go @@ -161,7 +161,7 @@ func (p *Plugin) Exec() error { return errors.New("missing ssh config (Host, Username)") } - if len(p.Config.Password) != 0 || len(p.Config.Key) != 0 { + if len(p.Config.Password) != 0 && len(p.Config.Key) != 0 { return errors.New("can't set password and key at the same time") }