Permalink
Browse files

Changed: include the CWD in the create log to prevent confusion

  • Loading branch information...
1 parent 631d681 commit 540ec8006f3ce03b938e005b15df51b6b4e378e0 @tj committed Sep 9, 2011
Showing with 9 additions and 2 deletions.
  1. +9 −2 bin/migrate
View
@@ -5,6 +5,7 @@
*/
var migrate = require('../')
+ , join = require('path').join
, fs = require('fs');
/**
@@ -19,6 +20,12 @@ var args = process.argv.slice(2);
var options = { args: [] };
+/**
+ * Current working directory.
+ */
+
+var cwd;
+
/**
* Usage information.
*/
@@ -83,7 +90,7 @@ while (args.length) {
break;
case '-c':
case '--chdir':
- process.chdir(required());
+ process.chdir(cwd = required());
break;
default:
if (options.command) {
@@ -187,7 +194,7 @@ var commands = {
title = title ? curr + '-' + title : curr;
var path = 'migrations/' + title + '.js';
- log('create', path);
+ log('create', join(cwd, path));
fs.writeFileSync(path, template);
saveConfig(config);
}

0 comments on commit 540ec80

Please sign in to comment.