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

ASF GitHub Bot commented on CB-6272:
------------------------------------

Github user jsoref commented on a diff in the pull request:

    https://github.com/apache/cordova-plugman/pull/66#discussion_r10821212
  
    --- Diff: src/util/plugins.js ---
    @@ -25,18 +25,30 @@ var http = require('http'),
         shell = require('shelljs'),
         child_process = require('child_process'),
         Q = require('q'),
    -    xml_helpers = require('./xml-helpers');
    +    xml_helpers = require('./xml-helpers'),
    +    tmp_dir;
     
     module.exports = {
         searchAndReplace:require('./search-and-replace'),
     
    +    clonePluginGit:function(plugin_git_url, plugins_dir, options) {
    +        return module.exports.clonePluginGitRepo(plugin_git_url, 
plugins_dir, options.subdir, options.git_ref).then(
    +            function(dst){
    +                // Keep location where we checked out git repo
    +                options.plugin_src_dir = tmp_dir;
    +                return dst;
    +            }
    +        );
    +    },
    +
         // Fetches plugin information from remote server.
         // Returns a promise.
         clonePluginGitRepo:function(plugin_git_url, plugins_dir, subdir, 
git_ref) {
    +
             if(!shell.which('git')) {
                 return Q.reject(new Error('"git" command line tool is not 
installed: make sure it is accessible on your PATH.'));
             }
    -        var tmp_dir = path.join(os.tmpdir(), 'plugman-tmp' +(new 
Date).valueOf());
    +        tmp_dir = path.join(os.tmpdir(), 'plugman', 'git', String((new 
Date).valueOf()));
    --- End diff --
    
    This should use Date.now()


> Fix subdir handling
> -------------------
>
>                 Key: CB-6272
>                 URL: https://issues.apache.org/jira/browse/CB-6272
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugman
>    Affects Versions: 3.5.0
>            Reporter: Josh Soref
>            Assignee: Jonathan Bond
>            Priority: Blocker
>
> CB-6160 landed [~jbondc]'s ae2ce7ac6325d1c6558365b4be82e5a8ff0983b9
> which broke some portion of install:
> +                if (dep.subdir) {
> +                    dep.subdir = path.join(dep.subdir.split('/'));
> ...
> -                    if (dep_subdir) {
> -                        dep_subdir = path.join.apply(null, 
> dep_subdir.split('/'));



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to