]> gitweb.factorcode.org Git - factor.git/commitdiff
command-line: if -e= is passed, don't run main vocab after evaluation ends
authorSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Mon, 25 Jan 2010 06:20:13 +0000 (19:20 +1300)
committerSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Mon, 25 Jan 2010 08:05:42 +0000 (21:05 +1300)
basis/bootstrap/finish-bootstrap.factor
basis/command-line/command-line-docs.factor
basis/command-line/command-line.factor

index 70ccaedad422a1110da717d6f8fa91196527c66a..387903d1e9d60968f2822e63fb6fbfc6d7041327 100644 (file)
@@ -8,9 +8,14 @@ namespaces eval kernel vocabs.loader io ;
         (command-line) parse-command-line
         load-vocab-roots
         run-user-init
-        "e" get [ eval( -- ) ] when*
-        ignore-cli-args? not script get and
-        [ run-script ] [ "run" get run ] if*
+
+        "e" get script get or [
+            "e" get [ eval( -- ) ] when*
+            script get [ run-script ] when*
+        ] [
+            "run" get run
+        ] if
+
         output-stream get [ stream-flush ] when*
         0 exit
     ] [ print-error 1 exit ] recover
index 697f95b14f595ed1a34d4f0f95ae7dd2a2b86a02..11ee46c2273958ab456e95d95e564d220fac421c 100644 (file)
@@ -37,10 +37,6 @@ HELP: main-vocab
 HELP: default-cli-args
 { $description "Sets global variables corresponding to default command line arguments." } ;
 
-HELP: ignore-cli-args?
-{ $values { "?" "a boolean" } }
-{ $description "On Mac OS X, source files to run are supplied by the Cocoa API, so to avoid running them twice the startup code has to call this word." } ;
-
 ARTICLE: "runtime-cli-args" "Command line switches for the VM"
 "A handful of command line switches are processed by the VM and not the library. They control low-level features."
 { $table
index 939fb82f008f0da27277faef527039dea009b3cd..643afef669b1f7ec476aab5193554d50f1ed5281 100644 (file)
@@ -67,7 +67,4 @@ SYMBOL: main-vocab-hook
         main-vocab "run" set
     ] bind ;
 
-: ignore-cli-args? ( -- ? )
-    os macosx? "run" get "ui" = and ;
-
 [ default-cli-args ] "command-line" add-startup-hook