cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dmitriy-barkalov <...@git.apache.org>
Subject [GitHub] cordova-medic pull request: Medic Refactor
Date Tue, 10 Mar 2015 17:09:13 GMT
Github user dmitriy-barkalov commented on a diff in the pull request:

    https://github.com/apache/cordova-medic/pull/37#discussion_r26141990
  
    --- Diff: bin/checkout.js ---
    @@ -0,0 +1,46 @@
    +#!/usr/bin/env node
    +
    +// node dependencies
    +var fs = require('fs');
    +
    +// external dependencies
    +var shell = require('shelljs');
    +
    +// parse args
    +var argv = require('optimist')
    +    .usage('Usage: $0 --config [path]')
    +    .demand('config')
    +    .argv;
    +
    +function cloneProject(projectName, projectsConfig) {
    +
    +    var project  = projectsConfig[projectName];
    +    var codebase = project.codebases[project.codebase];
    +    var command  = 'git clone ' + codebase.repo + ' --branch=' + codebase.branch + '
--depth 1'
    +
    +    shell.exec(command, {async: false}, function (returnCode, output) {
    --- End diff --
    
    `async: false` doesn't make this call synchronous. Now `exec` method sets async to true
if callback is provided https://github.com/arturadib/shelljs/blob/master/src/exec.js#L167.

    
    Remove `{async: false}` or callback to avoid confusion and side effects regarding shelljs
internal changes 


---
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