Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-14041

Programming error in cordova-android check_reqs.js

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 7.1.0
    • None
    • cordova-android
    • cordova 8.0.0

      android 7.1.0

      windows 10

      Eclipse neon

    • Patch, Important

    Description

      Programming error in check_reqs.js, line 130

      programmer doesnt iterate through a directory for gradle, checks only for first entry

       

          var dirs = fs.readdirSync(androidStudioPath);
          if (dirs[0].split('-')[0] === 'gradle') {
               return path.join(androidStudioPath, dirs[0], 'bin', 'gradle');
           }

      working solution

          var dirs = fs.readdirSync(androidStudioPath);
          for (var i = 0; i< dirs.length ; i++){
               if (dirs[i].split('-')[0] === 'gradle') 
                   return path.join(androidStudioPath, dirs[i], 'bin', 'gradle');
           }

      Attachments

        Activity

          People

            bowserj Joey Robert Bowser
            alschytt Allan Steen Schytt
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: