fix(config): fix double checking ResultsDir Path (#927)

This commit is contained in:
nyao
2019-12-12 09:29:12 +09:00
committed by Kota Kanbe
parent d6e74cce08
commit c17b4154ec

View File

@@ -177,13 +177,6 @@ func (c Config) ValidateOnConfigtest() bool {
func (c Config) ValidateOnScan() bool {
errs := c.checkSSHKeyExist()
if len(c.ResultsDir) != 0 {
if ok, _ := valid.IsFilePath(c.ResultsDir); !ok {
errs = append(errs, xerrors.Errorf(
"JSON base directory must be a *Absolute* file path. -results-dir: %s", c.ResultsDir))
}
}
if runtime.GOOS == "windows" && !c.SSHNative {
errs = append(errs, xerrors.New("-ssh-native-insecure is needed on windows"))
}