Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check assignment of SAGE_ROOT in $SAGE_ROOT/sage #12522

Closed
jdemeyer opened this issue Feb 16, 2012 · 6 comments
Closed

Check assignment of SAGE_ROOT in $SAGE_ROOT/sage #12522

jdemeyer opened this issue Feb 16, 2012 · 6 comments

Comments

@jdemeyer
Copy link

The top-level Sage script doesn't check the value of SAGE_ROOT if it was set from the outside. Example:

$ SAGE_ROOT=does_not_exist ./sage
./sage: line 118: cd: does_not_exist: No such file or directory
./sage: line 122: /spkg/bin/sage: No such file or directory

After:

$ SAGE_ROOT=does_not_exist ./sage
./sage: line 118: cd: does_not_exist: No such file or directory
./sage: cannot determine SAGE_ROOT directory

The new top-level script can now also be used together with sage-4.x:

$ SAGE_ROOT=/usr/local/src/sage-4.8.alpha6 /usr/local/src/sage-5.0.beta1/sage
----------------------------------------------------------------------
| Sage Version 4.8.alpha6, Release Date: 2012-01-01                  |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------
**********************************************************************
*                                                                    *
* Warning: this is a prerelease version, and it may be unstable.     *
*                                                                    *
**********************************************************************
sage:

apply attachment: 12522_check_sage_root.patch to SAGE_ROOT.

Component: scripts

Author: Jeroen Demeyer

Reviewer: Volker Braun

Merged: sage-5.0.beta5

Issue created by migration from https://trac.sagemath.org/ticket/12522

@jdemeyer

This comment has been minimized.

@jdemeyer

This comment has been minimized.

@jdemeyer
Copy link
Author

comment:2

Attachment: 12522_check_sage_root.patch.gz

@vbraun
Copy link
Member

vbraun commented Feb 18, 2012

comment:3

More error checking can't hurt ;-)

@vbraun
Copy link
Member

vbraun commented Feb 18, 2012

Reviewer: Volker Braun

@jdemeyer
Copy link
Author

Merged: sage-5.0.beta5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants