diff options
author | Kevin Burke <kevin@burke.dev> | 2021-11-09 00:04:10 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-09 09:04:10 +0100 |
commit | e86c6f5e7fc9f024a427e2870ab70644b5454725 (patch) | |
tree | bde5878b37dc151ae8643ef0473ea90a0d89a830 /tools | |
parent | 55682e36920e2ab7633fc6eee11466d3faed0bf8 (diff) | |
download | zsh-e86c6f5e7fc9f024a427e2870ab70644b5454725.tar.gz zsh-e86c6f5e7fc9f024a427e2870ab70644b5454725.tar.bz2 zsh-e86c6f5e7fc9f024a427e2870ab70644b5454725.zip |
style: use `-n` flag in `head` and `tail` commands (#10391)
Co-authored-by: Marc Cornellà <hello@mcornella.com>
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/install.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/install.sh b/tools/install.sh index 7704107c8..ca996f8a7 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -311,7 +311,7 @@ EOF # 1. Use the most preceding one based on $PATH, then check that it's in the shells file # 2. If that fails, get a zsh path from the shells file, then check it actually exists if ! zsh=$(command -v zsh) || ! grep -qx "$zsh" "$shells_file"; then - if ! zsh=$(grep '^/.*/zsh$' "$shells_file" | tail -1) || [ ! -f "$zsh" ]; then + if ! zsh=$(grep '^/.*/zsh$' "$shells_file" | tail -n 1) || [ ! -f "$zsh" ]; then fmt_error "no zsh binary found or not present in '$shells_file'" fmt_error "change your default shell manually." return |