You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2014/08/27 02:36:16 UTC
git commit: Revert "Handle symlinks to non sibling directories"
Repository: cordova-coho
Updated Branches:
refs/heads/master 6e204a428 -> 281787358
Revert "Handle symlinks to non sibling directories"
This reverts commit 939b5e150eb1e4f7399ac9919eb5b0ba44cba88a.
Project: http://git-wip-us.apache.org/repos/asf/cordova-coho/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-coho/commit/28178735
Tree: http://git-wip-us.apache.org/repos/asf/cordova-coho/tree/28178735
Diff: http://git-wip-us.apache.org/repos/asf/cordova-coho/diff/28178735
Branch: refs/heads/master
Commit: 28178735802956df9d640c83f35edcce326989c6
Parents: 6e204a4
Author: Steven Gill <st...@gmail.com>
Authored: Tue Aug 26 17:31:10 2014 -0700
Committer: Steven Gill <st...@gmail.com>
Committed: Tue Aug 26 17:31:10 2014 -0700
----------------------------------------------------------------------
src/repoutil.js | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-coho/blob/28178735/src/repoutil.js
----------------------------------------------------------------------
diff --git a/src/repoutil.js b/src/repoutil.js
index 615090d..c616962 100644
--- a/src/repoutil.js
+++ b/src/repoutil.js
@@ -415,23 +415,23 @@ function getRepoById(id, opt_repos) {
}
exports.getRepoById = getRepoById;
-var isInForEachRepoFunction = '';
+var isInForEachRepoFunction = false;
exports.forEachRepo = function*(repos, func) {
for (var i = 0; i < repos.length; ++i) {
var repo = repos[i];
- var origPath = isInForEachRepoFunction || '..';
- var newPath = path.join(isInForEachRepoFunction, repo.repoName);
+ var origPath = isInForEachRepoFunction ? process.cwd() : '..';
+ var newPath = isInForEachRepoFunction ? path.join('..', repo.repoName) : repo.repoName;
- isInForEachRepoFunction = isInForEachRepoFunction || process.cwd();
+ isInForEachRepoFunction = true;
shelljs.cd(newPath);
if (shelljs.error()) {
apputil.fatal('Repo directory does not exist: ' + repo.repoName + '. First run coho repo-clone.');
}
yield func(repo);
- shelljs.cd(isInForEachRepoFunction);
+ shelljs.cd(origPath);
- isInForEachRepoFunction = origPath != '..' && isInForEachRepoFunction || '';
+ isInForEachRepoFunction = origPath != '..';
}
}