[ 
https://issues.apache.org/jira/browse/CB-2075?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13534193#comment-13534193
 ] 

Filip Maj commented on CB-2075:
-------------------------------

Response
----

Hey, thanks, good to know

Ive also found a problem in android_parser.js along similar lines

the following line of code:

    {{var orig_java_class = fs.readdirSync(orig_pkgDir)[0];}}
expects that the first item in orig_pkgDir will be a java file. In my case this 
is not the case, it is the hidden .svn directory. So along the lines of the 
previous fix i have replace the above line with the following:
{code}
var orig_java_class;

var contents = fs.readdirSync(orig_pkgDir);

for (var key in contents)
{
    var pkgItem = contents[key];
    var fullPath = path.join(orig_pkgDir, pkgItem);
    var stats = fs.statSync(fullPath);
        if (stats.isDirectory()) {
        continue;
    }
    else
    {
        orig_java_class = pkgItem;
        break;
    }
}

if (orig_java_class == undefined)
{
    throw 'No java class was found when updating config';
}
{code}
                
> cordova build fails when project added to subversion
> ----------------------------------------------------
>
>                 Key: CB-2075
>                 URL: https://issues.apache.org/jira/browse/CB-2075
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CLI
>    Affects Versions: 2.2.0
>            Reporter: Filip Maj
>            Assignee: Filip Maj
>             Fix For: 2.3.0
>
>
> Ive set up an iOS and android project then used svn import to add to 
> repository then a checkout to create my local repo. When i run
> {{$ cordova build ios}}
> or
> {{$ cordova build android}}
> i get the following error
> {code}
> /bin/sh: /Users/{mydevpath}/.cordova/hooks/before_build/.svn: is a directory
> {code}
> Script ".svn"in the before_build hook exited with non-zero status code. 
> Aborting.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to