cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agrieve <...@git.apache.org>
Subject [GitHub] cordova-lib pull request: CB-8239 Add support for git urls to 'cor...
Date Sun, 18 Jan 2015 01:35:40 GMT
Github user agrieve commented on a diff in the pull request:

    https://github.com/apache/cordova-lib/pull/148#discussion_r23130053
  
    --- Diff: cordova-lib/src/cordova/lazy_load.js ---
    @@ -284,4 +286,47 @@ function custom(platforms, platform) {
         });
     }
     
    +// Returns a promise
    +function git_clone(repository) {
    +    // Create a tmp dir. Using /tmp is a problem because it's often on a different partition
and sehll.mv()
    +    // fails in this case with "EXDEV, cross-device link not permitted".
    +    var tmp_subidr = 'tmp_cordova_git_' + process.pid + '_' + (new Date()).valueOf();
    +    var tmp_dir = path.join(util.libDirectory, 'tmp', tmp_subidr);
    +    shell.rm('-rf', tmp_dir);
    +    shell.mkdir('-p', tmp_dir);
    +    if (!shell.which('git')) {
    --- End diff --
    
    might as well do this check before mkdir. that way you don't need to rmdir.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


Mime
View raw message