File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -494,15 +494,15 @@ def _detect_host_sdk(ctx):
494494 return root
495495
496496def _detect_sdk_platform (ctx , goroot ):
497- path = goroot + "/pkg/tool"
498- res = ctx . execute ([ "ls" , path ])
499- if res . return_code != 0 :
500- fail ( "Could not detect SDK platform: unable to list %s: %s" % ( path , res . stderr ) )
497+ path = ctx . path ( goroot + "/pkg/tool" )
498+ if not path . exists :
499+ fail ( "Could not detect SDK platform: failed to find " + str ( path ))
500+ tool_entries = path . readdir ( )
501501
502502 platforms = []
503- for f in res . stdout . strip (). split ( " \n " ) :
504- if f .find ("_" ) >= 0 :
505- platforms .append (f )
503+ for f in tool_entries :
504+ if f .basename . find ("_" ) >= 0 :
505+ platforms .append (f . basename )
506506
507507 if len (platforms ) == 0 :
508508 fail ("Could not detect SDK platform: found no platforms in %s" % path )
You can’t perform that action at this time.
0 commit comments