Ver código fonte

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.
pull/2072/head
rallyemax 3 anos atrás
committed by GitHub
pai
commit
0c6ad7c52b
Nenhuma chave conhecida encontrada para esta assinatura no banco de dados ID da chave GPG: 4AEE18F83AFDEB23
1 arquivos alterados com 2 adições e 2 exclusões
  1. +2
    -2
      README.md

+ 2
- 2
README.md Ver arquivo

@ -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"

Carregando…
Cancelar
Salvar