diff --git a/lib/do_packages.js b/lib/do_packages.js index 70cb7f2..5e9e0bf 100644 --- a/lib/do_packages.js +++ b/lib/do_packages.js @@ -30,6 +30,7 @@ var columnsDefaultLong = 'id,name,default,memory,swap,disk'; var sortDefault = '_groupPlus,memory'; function do_packages(subcmd, opts, args, callback) { + var i; if (opts.help) { this.do_help('help', {}, [subcmd], callback); return; @@ -44,7 +45,7 @@ function do_packages(subcmd, opts, args, callback) { columns = columns.split(','); var rightAligned = {memory: true, disk: true, swap: true, vcpus: true, lwps: true}; - for (var i = 0; i < columns.length; i++) { + for (i = 0; i < columns.length; i++) { if (rightAligned[columns[i]]) { columns[i] = {lookup: columns[i], align: 'right'}; } @@ -68,7 +69,7 @@ function do_packages(subcmd, opts, args, callback) { if (opts.json) { common.jsonStream(pkgs); } else { - for (var i = 0; i < pkgs.length; i++) { + for (i = 0; i < pkgs.length; i++) { var pkg = pkgs[i]; pkg.shortid = pkg.id.split('-', 1)[0];