diff --git a/plugin.go b/plugin.go index 81a8927..acce0f3 100644 --- a/plugin.go +++ b/plugin.go @@ -169,11 +169,6 @@ func (p *Plugin) removeAllDestFile() error { systemType = "windows" } - _, _, _, err = ssh.Run("uname", p.Config.CommandTimeout) - if err == nil { - systemType = "unix" - } - // remove tar file err = p.removeDestFile(systemType, ssh) if err != nil { @@ -309,17 +304,12 @@ func (p *Plugin) Exec() error { }, } - _, _, _, err := ssh.Run("ver", p.Config.CommandTimeout) systemType := "unix" + _, _, _, err := ssh.Run("ver", p.Config.CommandTimeout) if err == nil { systemType = "windows" } - _, _, _, err = ssh.Run("uname", p.Config.CommandTimeout) - if err == nil { - systemType = "unix" - } - // upload file to the tmp path p.DestFile = fmt.Sprintf("%s%s", p.Config.TarTmpPath, p.DestFile)