Skip to content

Commit

Permalink
update hft commands so first arg, the cmd, is removed from args._
Browse files Browse the repository at this point in the history
  • Loading branch information
greggman committed Sep 19, 2014
1 parent 6934604 commit ab4455b
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions cli/cmds/download-file.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ var downloadFile = function(args) {
verbose: args['verbose'],
};

var url = args._[1];
var destPath = args._[2];
var url = args._[0];
var destPath = args._[1];
var log = options.verbose ? console.log.bind(console) : function() { };
var print = options.verbose ? sys.print.bind(sys) : function() { };

Expand Down
2 changes: 1 addition & 1 deletion cli/cmds/download.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ var download = function(args) {
overwrite: args['overwrite'],
};

var gameId = args._[1];
var gameId = args._[0];

var emitter = require('../../management/download').download(gameId, args.dst, options);
emitter.on('status', function(e) {
Expand Down
2 changes: 1 addition & 1 deletion cli/cmds/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ var install = function(args) {
overwrite: args['upgrade'],
};

var srcPath = path.resolve(args._[1]);
var srcPath = path.resolve(args._[0]);

if (require('../../management/install').install(srcPath, args.dst, options) === false) {
reject();
Expand Down
2 changes: 1 addition & 1 deletion cli/cmds/make-release.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ var makeRelease = function(args) {
return;
}

var destPath = path.resolve(args._[1]);
var destPath = path.resolve(args._[0]);
var fullPath = args.src ? path.resolve(args.src) : process.cwd();

require('../../management/make').make(fullPath, destPath, args).then(function(files) {
Expand Down
2 changes: 1 addition & 1 deletion cli/cmds/remove.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ var Promise = require('promise');

var remove = function(args) {
return new Promise(function(resolve, reject) {
var fullPath = args._.length > 1 ? args._[1] : process.cwd();
var fullPath = args._.length > 0 ? args._[0] : process.cwd();
games.remove(fullPath);
resolve();
});
Expand Down
2 changes: 1 addition & 1 deletion cli/cmds/uninstall.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ var uninstall = function(args) {
verbose: args['verbose'],
};

var gamePathOrId = args._[1];
var gamePathOrId = args._[0];

if (require('../../management/uninstall').uninstall(gamePathOrId, options) === false) {
reject();
Expand Down
1 change: 1 addition & 0 deletions cli/hft.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ try {
utils.printUsage(globalOptions, cmdModule.usage, cmdModule.name);
process.exit(1);
}
args._.shift(); // remove cmd
cmdModule.cmd(args).then(function() {
// We have to exit explicitly because there are event listeners for folders
process.exit(0);
Expand Down

0 comments on commit ab4455b

Please sign in to comment.