@@ -255,6 +255,17 @@ func (p *Manager) conanfileDir(pkgPath, pkgFolder string) string {
255255}
256256
257257func conanInstall (pkg , outDir , conanfileDir string , out io.Writer , options []string , flags int ) (err error ) {
258+ quietInstall := flags & ToolQuietInstall != 0
259+ app , err := conanCmd .Get (quietInstall )
260+ if err != nil {
261+ return
262+ }
263+
264+ err = conanDetect (app , out )
265+ if err != nil {
266+ return
267+ }
268+
258269 args := make ([]string , 0 , 16 )
259270 args = append (args , "install" ,
260271 "--requires" , pkg ,
@@ -266,18 +277,29 @@ func conanInstall(pkg, outDir, conanfileDir string, out io.Writer, options []str
266277 for _ , opt := range options {
267278 args = append (args , "--options" , opt )
268279 }
269- quietInstall := flags & ToolQuietInstall != 0
270- cmd , err := conanCmd .New (quietInstall , args ... )
271- if err != nil {
272- return
273- }
280+ cmd := exec .Command (app , args ... )
274281 cmd .Dir = conanfileDir
275282 cmd .Stderr = os .Stderr
276283 cmd .Stdout = out
277284 err = cmd .Run ()
278285 return
279286}
280287
288+ func conanDetect (app string , out io.Writer ) (err error ) {
289+ profileCmd := exec .Command (app , "profile" , "show" )
290+ profileCmd .Stdout = out
291+ profileCmd .Stderr = os .Stderr
292+ profileErr := profileCmd .Run ()
293+ if profileErr == nil {
294+ return
295+ }
296+ detectCmd := exec .Command (app , "profile" , "detect" )
297+ detectCmd .Stdout = out
298+ detectCmd .Stderr = os .Stderr
299+ err = detectCmd .Run ()
300+ return
301+ }
302+
281303func recipeRevision (_ * Package , _ * githubRelease , conandataYml []byte ) string {
282304 return md5Of (conandataYml )
283305}
0 commit comments