From 6485409a55b5ed9f6f6e47a97b1b3c76dddfcc69 Mon Sep 17 00:00:00 2001 From: CIARANA Date: Thu, 7 Sep 2017 20:31:02 +0900 Subject: [PATCH 1/5] Update `pyenv init` line in README.md Update `pyenv init` line in README.md in case ```pyenv``` is not found. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6235ca5c..d9510e93 100644 --- a/README.md +++ b/README.md @@ -203,7 +203,7 @@ easy to fork and contribute any changes back upstream. Please make sure `eval "$(pyenv init -)"` is placed toward the end of the shell configuration file since it manipulates `PATH` during the initialization. ```sh - $ echo 'eval "$(pyenv init -)"' >> ~/.bash_profile + $ echo '[ -x ~/.pyenv/bin/pyenv ] && eval "$(pyenv init -)"' >> ~/.bash_profile ``` **Zsh note**: Modify your `~/.zshenv` file instead of `~/.bash_profile`. **Ubuntu and Fedora note**: Modify your `~/.bashrc` file instead of `~/.bash_profile`. From bc58ab54f89f788bcec19d29ed84a858d0f85698 Mon Sep 17 00:00:00 2001 From: CIARANA Date: Fri, 8 Sep 2017 00:28:19 +0900 Subject: [PATCH 2/5] Change `~/.pyenv` to `$PYENV_ROOT` --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d9510e93..30b829f9 100644 --- a/README.md +++ b/README.md @@ -203,7 +203,7 @@ easy to fork and contribute any changes back upstream. Please make sure `eval "$(pyenv init -)"` is placed toward the end of the shell configuration file since it manipulates `PATH` during the initialization. ```sh - $ echo '[ -x ~/.pyenv/bin/pyenv ] && eval "$(pyenv init -)"' >> ~/.bash_profile + $ echo '[ -x $PYENV_ROOT/bin/pyenv ] && eval "$(pyenv init -)"' >> ~/.bash_profile ``` **Zsh note**: Modify your `~/.zshenv` file instead of `~/.bash_profile`. **Ubuntu and Fedora note**: Modify your `~/.bashrc` file instead of `~/.bash_profile`. From 2a2cbea9513943b111ba59591f48480bc0bab10c Mon Sep 17 00:00:00 2001 From: cia-rana Date: Fri, 8 Sep 2017 01:23:21 +0900 Subject: [PATCH 3/5] Change `[` to `[[` and move it into `eval` --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 30b829f9..3512ae31 100644 --- a/README.md +++ b/README.md @@ -203,7 +203,7 @@ easy to fork and contribute any changes back upstream. Please make sure `eval "$(pyenv init -)"` is placed toward the end of the shell configuration file since it manipulates `PATH` during the initialization. ```sh - $ echo '[ -x $PYENV_ROOT/bin/pyenv ] && eval "$(pyenv init -)"' >> ~/.bash_profile + $ echo 'eval "$([[ -x $PYENV_ROOT/bin/pyenv ]] && pyenv init -)"' >> ~/.bash_profile ``` **Zsh note**: Modify your `~/.zshenv` file instead of `~/.bash_profile`. **Ubuntu and Fedora note**: Modify your `~/.bashrc` file instead of `~/.bash_profile`. From 839c9e5c769ad4b568d75ef0a396f21e1aef0c9a Mon Sep 17 00:00:00 2001 From: cia-rana Date: Fri, 8 Sep 2017 02:07:47 +0900 Subject: [PATCH 4/5] Update `pyenv init` line in README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3512ae31..2b845ece 100644 --- a/README.md +++ b/README.md @@ -203,7 +203,7 @@ easy to fork and contribute any changes back upstream. Please make sure `eval "$(pyenv init -)"` is placed toward the end of the shell configuration file since it manipulates `PATH` during the initialization. ```sh - $ echo 'eval "$([[ -x $PYENV_ROOT/bin/pyenv ]] && pyenv init -)"' >> ~/.bash_profile + $ echo '[[ -x $PYENV_ROOT/bin/pyenv ]] && eval "$($PYENV_ROOT/bin/pyenv init -)"' >> ~/.bash_profile ``` **Zsh note**: Modify your `~/.zshenv` file instead of `~/.bash_profile`. **Ubuntu and Fedora note**: Modify your `~/.bashrc` file instead of `~/.bash_profile`. From f6384fe8d4d72be170ccefe09b63ba7ae34444dd Mon Sep 17 00:00:00 2001 From: CIARANA Date: Sat, 9 Sep 2017 00:39:02 +0900 Subject: [PATCH 5/5] Update `pyenv init` line in README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2b845ece..3a3135be 100644 --- a/README.md +++ b/README.md @@ -203,7 +203,7 @@ easy to fork and contribute any changes back upstream. Please make sure `eval "$(pyenv init -)"` is placed toward the end of the shell configuration file since it manipulates `PATH` during the initialization. ```sh - $ echo '[[ -x $PYENV_ROOT/bin/pyenv ]] && eval "$($PYENV_ROOT/bin/pyenv init -)"' >> ~/.bash_profile + $ echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.bash_profile ``` **Zsh note**: Modify your `~/.zshenv` file instead of `~/.bash_profile`. **Ubuntu and Fedora note**: Modify your `~/.bashrc` file instead of `~/.bash_profile`.