#10822: sage -sh doesn't work on OSX
-----------------------+----------------------------------------------------
   Reporter:  jason    |       Owner:     
       Type:  defect   |      Status:  new
   Priority:  major    |   Milestone:     
  Component:  scripts  |    Keywords:     
     Author:           |    Upstream:  N/A
   Reviewer:           |      Merged:     
Work_issues:           |  
-----------------------+----------------------------------------------------

Comment(by jhpalmieri):

 First of all, I think path_helper might be working properly.  On my
 machine, the documentation says that it adds paths found in the files in
 /etc/paths.d/, which on my machine just adds `/usr/texbin` and
 `/usr/X11/bin`.  In particular, I think that /usr/bin, etc. are already at
 the start of the path before path_helper is run.

 Second, I don't see this problem, but maybe I'm not doing things right.
 My default shell is bash, but if I do
 {{{
 $ zsh
 jpalmieri538% sage -sh

 Starting subshell with Sage environment variables set.
 Be sure to exit when you are done and do not do anything
 with other copies of Sage!

 Bypassing shell configuration files ...

 SAGE_ROOT=/Applications/sage
 (sage subshell) jpalmieri538:~ palmieri$ echo $PATH
 
/Applications/sage/local/Frameworks/Python.framework/Versions/2.5/bin:/Applications/sage:/Applications/sage/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/texbin:/usr/X11/bin:/Users/palmieri/bin:/Applications/sage
 SAGE_ROOT=/Applications/sage
 }}}
 (Also, are you sure that this has to do with zsh?  Your first line says
 {{{bash-3.2$}}}.)

 To troubleshoot this, try applying this patch to sage-sage in
 SAGE_ROOT/local/bin:
 {{{
 #!diff

 diff -r e7a865848991 sage-sage
 --- a/sage-sage
 +++ b/sage-sage
 @@ -476,6 +476,7 @@ if [ "$1" = '-sh'  -o "$1" = '--sh' ]; t
      SHELL_NAME=`basename $SHELL`
      echo "Bypassing shell configuration files ..."
      echo
 +    echo "PATH is set to $PATH"
      # We must start a new shell with no .profile or .bashrc files
      # processed, so that we know our path is correct
      PS1="SAGE_ROOT=${SAGE_ROOT}\n(sage subshell) \h:\W \u\$ "
 }}}
 Then it will print the PATH before it even starts the new shell.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10822#comment:1>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to