You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Andrew Grieve (JIRA)" <ji...@apache.org> on 2014/12/01 19:12:13 UTC

[jira] [Resolved] (CB-7994) Faulty regex in check_reqs.js

     [ https://issues.apache.org/jira/browse/CB-7994?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Grieve resolved CB-7994.
-------------------------------
    Resolution: Fixed

Think this was addressed in Sept 10 commit: bf13fd48

> 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
>              Labels: regex
>
> 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