@@ -134,8 +134,8 @@ func initializePlugins(t testing.TB, configDir string) {
134
134
require .NoError (t , os .MkdirAll (filepath .Join (configDir , "cli-plugins" ), 0o755 ),
135
135
"Failed to create cli-plugins directory" )
136
136
composePlugin , err := findExecutable (DockerComposeExecutableName )
137
- if os . IsNotExist ( err ) {
138
- t .Logf ("WARNING: docker-compose cli-plugin not found" )
137
+ if err != nil {
138
+ t .Errorf ("WARNING: docker-compose cli-plugin not found %s" , err . Error () )
139
139
}
140
140
buildxPlugin , err := findPluginExecutable (DockerBuildxExecutableName )
141
141
if os .IsNotExist (err ) {
@@ -159,8 +159,11 @@ func dirContents(dir string) []string {
159
159
}
160
160
161
161
func findExecutable (executableName string ) (string , error ) {
162
- _ , filename , _ , _ := runtime .Caller (0 )
163
- root := filepath .Join (filepath .Dir (filename ), ".." , ".." )
162
+ filename , err := os .Getwd ()
163
+ if err != nil {
164
+ return "" , err
165
+ }
166
+ root := filepath .Join (filepath .Dir (filename ), ".." )
164
167
buildPath := filepath .Join (root , "bin" , "build" )
165
168
166
169
bin , err := filepath .Abs (filepath .Join (buildPath , executableName ))
0 commit comments