mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-21 20:47:00 -05:00
Fix sed commands (#2071)
In GNU `sed`, the `-iEe` argument is equivalent to `--in-place=Ee`, which would create `~/.profileEe` as backup of `~/.profile` if the command executed successfully. However, because the `e` is no longer being processed as an expression argument, `sed` does not correctly join the expressions and exits with `sed: -e expression #2, char 10: unexpected }`. The intent is to use extended regex, perform the changes in-place, and use a series of expressions, so `-Ei -e` is used instead.
This commit is contained in:
parent
1bd397112a
commit
0c6ad7c52b
1 changed files with 2 additions and 2 deletions
|
@ -239,7 +239,7 @@ easy to fork and contribute any changes back upstream.
|
|||
~~~bash
|
||||
# the sed invocation inserts the lines at the start of the file
|
||||
# after any initial comment lines
|
||||
sed -iEe '/^([^#]|$)/ {a \
|
||||
sed -Ei -e '/^([^#]|$)/ {a \
|
||||
export PYENV_ROOT="$HOME/.pyenv"
|
||||
a \
|
||||
export PATH="$PYENV_ROOT/bin:$PATH"
|
||||
|
@ -253,7 +253,7 @@ easy to fork and contribute any changes back upstream.
|
|||
- **If your `~/.bash_profile` sources `~/.bashrc` (Red Hat, Fedora, CentOS):**
|
||||
|
||||
~~~ bash
|
||||
sed -iEe '/^([^#]|$)/ {a \
|
||||
sed -Ei -e '/^([^#]|$)/ {a \
|
||||
export PYENV_ROOT="$HOME/.pyenv"
|
||||
a \
|
||||
export PATH="$PYENV_ROOT/bin:$PATH"
|
||||
|
|
Loading…
Reference in a new issue