Commit graph

17 commits

Author SHA1 Message Date
James Stronz
47b0ce77c0
Re-allow paths in .python-version provided that they resolve to within the versions dir (#2442)
* Fixes #2430 while still preventing CVE-2022-35861
* Adds a skipped version message to stderr

Co-authored-by: Ivan Pozdeev <vano@mail.mipt.ru>
2022-09-03 22:37:53 +03:00
James Stronz
22fa683571
CVE-2022-35861: Fixed relative path traversal due to using version string in path (#2412) 2022-07-17 01:01:04 +03:00
Ville Skyttä
c3fd96c429
Version file read improvements (#2269)
* Don't bother reading empty version files
* Implement version file read in pure bash
Is faster with usual sized version files, slower with degenerate cases.
2022-05-06 19:51:51 +03:00
Ville Skyttä
641916270b feat: support (skip) commented lines in version-file
Sometimes it is convenient to be able to temporarily disable something
in a version-file. Because these files often aren't necessarily tracked
in a SCM, especially when working with virtualenvs, the SCM diffs won't
help with showing removed lines which are currently the only way to
disable something.
2021-04-11 07:46:34 +03:00
Edwin Shin
89786b909f
pyenv-version-file-read: use POSIX character sets (#1554)
Fixes #623
2020-03-13 09:08:18 -04:00
Andrew Rabert
0f596d2504 Revert "Merge pull request #1153 from cmcginty/remove-sbang"
This reverts commit 070e1c859f, reversing
changes made to 3faeda67bb.
2019-04-23 10:23:33 -04:00
Casey McGinty
83e5459cfb Remove shebang lines from scripts for performance
All scripts in libexec/ (excluding pyenv) are called through pyenv,
therefore the shebang lines are not necessary. On some systems this
provides a measurable increase in performance of the shell prompt.

Related to pyenv/pyenv-virtualenv#259
2019-03-07 22:15:14 +01:00
Daniel Hahler
9156191168 pyenv-version-file-read: use sed/cut instead of type/head/awk
I was seeing the following occasionally in scripts:

> …/.pyenv/libexec/pyenv-version-file-read: line 12: type: write error: Broken pipe

This patch hopefully improves/fixes this, and it seems better anyway to
just use sed here.
2015-05-16 23:02:00 +02:00
Yamashita Yuu
0c81002220 Prefer gawk over awk if both are available. 2014-05-01 13:09:55 +09:00
Yamashita Yuu
34065dddbb reads only the first word from file 2014-03-24 19:42:52 +09:00
Yamashita Yuu
ea9214bb2e ignores carriage returns 2014-03-24 18:15:40 +09:00
Yamashita Yuu
8ddf8760d5 Import recent changes from rbenv 0.4.0 2014-01-02 22:45:02 +09:00
Yamashita Yuu
403f4eb7a7 Preserve original IFSs 2013-08-15 22:29:47 +09:00
Yamashita Yuu
fca31c4307 import trivial changes from rbenv 0.4.0 2013-01-18 19:10:35 +09:00
Yamashita Yuu
da06998457 import rbenv-help from rbenv 0.4.0 2013-01-18 19:09:56 +09:00
Yamashita Yuu
8187bc84e3 search commands from python version stack.
users can use multiple python versions at once.
2012-08-31 16:09:46 +09:00
Yamashita Yuu
2457419b4a created new project.
modified rbenv source for Python and renamed to pyenv.
2012-08-31 15:30:20 +09:00