Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows support: first attempt #224

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/atmosphere.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var Config = require('./config');
var path = require('path');
var fs = require('fs');
var _ = require('underscore');
var spawn = require('child_process').spawn;
var spawn = require('spawn-cmd').spawn;
var exec = require('child_process').exec;
var git = require('./utils/git');
var _ = require('underscore');
Expand Down
2 changes: 1 addition & 1 deletion lib/command.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var spawn = require('child_process').spawn;
var spawn = require('spawn-cmd').spawn;
var exec = require('child_process').exec;
var path = require('path');
var fs = require('fs');
Expand Down
2 changes: 1 addition & 1 deletion lib/meteor.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ var Command = require('./command');
var fs = require('fs');
var fstream = require('fstream');
var wrench = require('wrench');
var spawn = require('child_process').spawn;
var spawn = require('spawn-cmd').spawn;
var exec = require('child_process').exec;


Expand Down
11 changes: 8 additions & 3 deletions lib/sources/git.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var path = require('path');
var wrench = require('wrench');
var fs = require('fs');
var url = require('url');
var spawn = require('child_process').spawn;
var spawn = require('spawn-cmd').spawn;
var exec = require('child_process').exec;
var fstream = require('fstream');

Expand Down Expand Up @@ -109,11 +109,16 @@ GitSource.prototype._pull = function(fn) {
GitSource.prototype._clone = function(fn) {
var self = this;
if (!fs.existsSync(this.sourcePath)) {
exec('git clone ' + self.url + ' "' + this.sourcePath + '"', function(err, stdout, stderr) {
require('fs-extra').mkdirs(self.sourcePath, function(err) {
if (err)
throw "There was a problem cloning repo: " + self.url +
"\nPlease check https://github.com/oortcloud/meteorite/blob/master/CONTRIBUTING.md#troubleshooting for potential explanations.";
fn();
exec('git clone ' + self.url + ' "' + self.sourcePath + '"', function(err, stdout, stderr) {
if (err)
throw "There was a problem cloning repo: " + self.url +
"\nPlease check https://github.com/oortcloud/meteorite/blob/master/CONTRIBUTING.md#troubleshooting for potential explanations.";
fn();
});
});
} else {
fn();
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
, "prompt": "0.2.11"
, "colors": "0.6.0-1"
, "async": "0.2.9"
, "spawn-cmd": "0.0.1"
, "fs-extra": "0.8.1"
}
, "devDependencies":
{ "mocha": ">=1.2.2"
Expand Down
2 changes: 1 addition & 1 deletion spec/lib/runner.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// run mrt against a certain app and wait for given output

var path = require('path');
var spawn = require('child_process').spawn;
var spawn = require('spawn-cmd').spawn;
var exec = require('child_process').exec;
var _ = require('underscore');
var utils = require('./utils.js');
Expand Down
2 changes: 1 addition & 1 deletion spec/lib/utils.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// basic filesystem utils for our tests
var spawn = require('child_process').spawn;
var spawn = require('spawn-cmd').spawn;
var path = require('path');
var fs = require('fs');
var _ = require('underscore');
Expand Down
2 changes: 1 addition & 1 deletion spec/support/bin/curl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env node

var spawn = require('child_process').spawn;
var spawn = require('spawn-cmd').spawn;
var fs = require('../../../lib/utils/fs');
var path = require('path');
var wrench = require('wrench');
Expand Down
2 changes: 1 addition & 1 deletion spec/support/bin/git
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env node

var spawn = require('child_process').spawn;
var spawn = require('spawn-cmd').spawn;
var path = require('path');
var fs = require('../../../lib/utils/fs');
var wrench = require('wrench');
Expand Down