Skip to content

Commit 8497e52

Browse files
author
Release Manager
committed
gh-40495: remove `unset TERM` when initializing non-interactive sage <!-- ^ Please provide a concise and informative title. --> <!-- ^ Don't put issue numbers in the title, do this in the PR description below. --> <!-- ^ For example, instead of "Fixes #12345" use "Introduce new method to calculate 1 + 2". --> <!-- v Describe your changes below in detail. --> <!-- v Why is this change required? What problem does it solve? --> <!-- v If this PR resolves an open issue, please link to it here. For example, "Fixes #12345". --> Sage unsets the environment variable `TERM`, which disables colored output by default. This behavior also causes error for packages that depend on `curses.setupterm` because `curses.setupterm` raises an error when `TERM` is unset. `pwntools` is also affected by this issue. #39334 3-manifolds/Sage_macOS#78 The original issue #12263 is 13 years ago and has been [resolved](https://bugs.python.org/issue19884) since python 3.5. ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation and checked the documentation preview. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on. For example, --> <!-- - #12345: short description why this is a dependency --> <!-- - #34567: ... --> URL: #40495 Reported by: unprintable123 Reviewer(s):
2 parents f580145 + e777aec commit 8497e52

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/bin/sage

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,6 @@ fi
578578
if [ "$1" = '-c' ]; then
579579
shift
580580
sage_setup
581-
unset TERM # See Issue #12263
582581
exec sage-eval "$@"
583582
fi
584583

@@ -1116,7 +1115,6 @@ if [ $# -ge 1 ]; then
11161115
exit 1
11171116
fi
11181117
sage_setup
1119-
unset TERM # See Issue #12263
11201118
# sage-run rejects all command line options as the first argument.
11211119
exec sage-run "$@"
11221120
fi

0 commit comments

Comments
 (0)