@@ -74,7 +74,11 @@ func InstallOrUpdate(name string, directory string, v semver.Version, interactiv
7474 if err := fixDriverPermissions (name , path , interactive ); err != nil {
7575 return err
7676 }
77- return verifyExecutes (name )
77+
78+ if _ , err := validateDriver (executable , minAcceptableDriverVersion (name , v )); err != nil {
79+ return err
80+ }
81+ return nil
7882}
7983
8084// verifyExecutes ensures the installed auxiliary driver binary executes successfully.
@@ -149,12 +153,15 @@ func validateDriver(executable string, v semver.Version) (string, error) {
149153 klog .Infof ("Validating %s, PATH=%s" , executable , os .Getenv ("PATH" ))
150154 path , err := exec .LookPath (executable )
151155 if err != nil {
152- return path , err
156+ klog .Warningf ("driver not in path : %s, %v" , path , err .Error ())
157+ return path , ErrAuxDriverVersionNotinPath
153158 }
154159
155- output , err := exec .Command (path , "version" ).Output ()
160+ cmd := exec .Command (path , "version" )
161+ output , err := cmd .CombinedOutput ()
156162 if err != nil {
157- return path , err
163+ klog .Warningf ("%s failed: %v: %s" , strings .Join (cmd .Args , " " ), err , output )
164+ return path , ErrAuxDriverVersionCommandFailed
158165 }
159166
160167 ev := extractDriverVersion (string (output ))
0 commit comments