aboutsummaryrefslogtreecommitdiff
path: root/src/shell.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2011-07-30 11:36:23 -0700
committerAlon Zakai <alonzakai@gmail.com>2011-07-30 11:36:23 -0700
commite1f51c6d670ff74b16c3ceeef96af1bca5f02f0e (patch)
treed3258c314952a05d9893afdd1cacb395f54a1b10 /src/shell.js
parent3268d11056f2ee5544dbad295c6cbde245e1306c (diff)
let Module specify arguments
Diffstat (limited to 'src/shell.js')
-rw-r--r--src/shell.js12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/shell.js b/src/shell.js
index 06cf4175..222aba26 100644
--- a/src/shell.js
+++ b/src/shell.js
@@ -12,13 +12,15 @@
if (!this['Module']) {
this['Module'] = {};
}
-try {
- Module.arguments = scriptArgs;
-} catch(e) {
+if (!Module.arguments) {
try {
- Module.arguments = arguments;
+ Module.arguments = scriptArgs;
} catch(e) {
- Module.arguments = [];
+ try {
+ Module.arguments = arguments;
+ } catch(e) {
+ Module.arguments = [];
+ }
}
}
//*/