diff src/octave.cc @ 11837:e76649d19a1a release-3-0-x

octave.cc (octave_main): make all command-line arguments available to startup scripts
author John W. Eaton <jwe@octave.org>
date Mon, 15 Sep 2008 08:06:54 +0200
parents ffdbdf53665c
children
line wrap: on
line diff
--- a/src/octave.cc
+++ b/src/octave.cc
@@ -750,6 +750,11 @@
 
   initialize_version_info ();
 
+  // Make all command-line arguments available to startup files,
+  // including PKG_ADD files.
+
+  intern_argv (argc, argv);
+
   load_path::initialize (set_initial_path);
 
   execute_startup_files ();
@@ -778,10 +783,6 @@
 
   if (! code_to_eval.empty ())
     {
-      // We probably want all the args for an --eval option.
-
-      intern_argv (argc, argv);
-
       int parse_status = execute_eval_option_code (code_to_eval);
 
       if (! (persist || remaining_args > 0))