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

Programming error in cordova-android check_reqs.js

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 7.1.0
    • Fix Version/s: None
    • Component/s: cordova-android
    • Labels:
    • Environment:

      cordova 8.0.0

      android 7.1.0

      windows 10

      Eclipse neon

    • Flags:
      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

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

              Dates

              • Created:
                Updated: