confess
confess copied to clipboard
TypeError: undefined is not an object (evaluating 'phantom.args.length')
diff --git a/confess.js b/confess.js
index 6164d55..99ea04d 100644
--- a/confess.js
+++ b/confess.js
@@ -1,3 +1,4 @@
+var system = require('system');
var fs = require('fs');
var confess = {
@@ -411,11 +412,11 @@ var confess = {
},
processArgs: function (config, contract) {
- var a = 0;
+ var a = 1;
var ok = true;
contract.forEach(function(argument) {
- if (a < phantom.args.length) {
- config[argument.name] = phantom.args[a];
+ if (a < system.args.length) {
+ config[argument.name] = system.args[a];
} else {
if (argument.req) {
console.log('"' + argument.name + '" argument is required. This ' + argument.desc + '.');