Skip to content

Make $SAGE_LOCAL/bin/sage work again from any directory, in an environment without SAGE_* variables, following symlinks #30888

@mkoeppe

Description

@mkoeppe

The feature introduced in #25486 (Discover SAGE_SCRIPTS_DIR to make $SAGE_LOCAL/bin/sage work from any directory, in an environment without SAGE_* variables) was killed by #30128 (enforce sourcing of sage-env-config before src/bin/sage-env).

We repair it, making sure that it works even if $0 is a symlink.

CC: @orlitzky @dimpase @jhpalmieri

Component: scripts

Keywords: sd111

Author: Michael Orlitzky

Branch/Commit: a63d256

Reviewer: Matthias Koeppe

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions