cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark L (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CB-7994) Faulty regex in check_reqs.js
Date Mon, 10 Nov 2014 02:51:34 GMT
Mark L created CB-7994:
--------------------------

             Summary: Faulty regex in check_reqs.js
                 Key: CB-7994
                 URL: https://issues.apache.org/jira/browse/CB-7994
             Project: Apache Cordova
          Issue Type: Bug
          Components: CordovaJS
    Affects Versions: 4.0.0
         Environment: OS X 10.9.5
            Reporter: Mark L
            Priority: Minor


I'm running cordova 4.0.0 on Os X 10.9.5.
While trying to track an error message from file /Users/[user]/.cordova/lib/npm_cache/cordova-android/3.6.4/package/bin/lib/check_reqs.js
I noticed that some regular expressions appear to be faulty.  Lines 52, 57, 58, 61 of module.exports.get_target()
each contain:
shelljs.grep(/...[\d+]/)
There are a couple of problems:
1)  The '+' is inside the brackets: [\d+]  .  On another note, \d by itself doesn't need to
be in brackets.  So in perl or egrep, either \d+ or  [\d]+ would be fine.
2)  If this is calling grep, it doesn't use standard perl regex syntax, so neither '+' nor
'\d' work.  This expression would work with egrep ('extended grep'), though.  An alternate
solution would be to use '*' instead of '+', if it is not too general, as that works in grep.

So, either   grep with [0-9]*  , or egrep with \d+

Note:  I am trying to solve this message, although fixing the regexes didn't accomplish it.
 When running 'ionic platform android':
Error: Please install Android target "android-19".
Hint: Run "android" from your command-line to open the SDK manager.
    at /Users/[user]/.cordova/lib/npm_cache/cordova-android/3.6.4/package/bin/lib/check_reqs.js:174:19




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message