Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added OS detection so that windows git commands can be formatted diff…

…erently
  • Loading branch information...
commit e55f4892e4fa00edc9420a67b91ff9142bb5df92 1 parent cafd995
@chrismatthieu chrismatthieu authored
Showing with 8 additions and 1 deletion.
  1. +8 −1 lib/app.js
View
9 lib/app.js
@@ -244,7 +244,14 @@ module.exports = {
fs.writeFileSync(folder + '/' + data.start, defaultCode);
log.info('writing the package.json file');
fs.writeFileSync(folder + '/package.json', packageJSON);
- var cmd = 'cd ' + folder + '; git add ' + data.start + ' package.json .gitignore; git commit -am "Initial commit via ' + config.brand + '-cli"; git push origin master;';
+
+ var isWin = !!process.platform.match(/^win/);
+ if (isWin){
+ var cmd = 'cd ' + folder + ' && git add ' + data.start + ' package.json .gitignore && git commit -am "Initial commit via ' + config.brand + '-cli" && git push origin master';
+ } else {
+ var cmd = 'cd ' + folder + '; git add ' + data.start + ' package.json .gitignore; git commit -am "Initial commit via ' + config.brand + '-cli"; git push origin master;';
+ }
+
log.info('processing the initial commit');
var child2 = exec(cmd, function (error, stdout, stderr) {
Please sign in to comment.
Something went wrong with that request. Please try again.