Skip to content

Commit ae8d617

Browse files
author
farfarfun
committed
fix(install): BSD grep needs -- before pattern starting with dashes
Made-with: Cursor
1 parent db5e886 commit ae8d617

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

install.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ _nlt_canonical_bin_dir() {
9595

9696
_nlt_rc_has_managed_block() {
9797
local f="$1"
98-
[[ -f "$f" ]] && grep -Fq '--- nltdeploy PATH' "$f"
98+
[[ -f "$f" ]] && grep -Fq -- '--- nltdeploy PATH' "$f"
9999
}
100100

101101
_nlt_rc_path_mentions_bin() {
@@ -177,7 +177,7 @@ _nlt_install_path_to_profiles() {
177177
_remove_managed_path_block_from_file() {
178178
local f="$1"
179179
[[ -f "$f" ]] || return 0
180-
grep -Fq '--- nltdeploy PATH' "$f" || return 0
180+
grep -Fq -- '--- nltdeploy PATH' "$f" || return 0
181181
local start end tmp
182182
start="$(grep -nF '# --- nltdeploy PATH (github.com/farfarfun/nltdeploy install.sh) ---' "$f" | head -1 | cut -d: -f1)"
183183
end="$(grep -nF '# --- end nltdeploy PATH ---' "$f" | head -1 | cut -d: -f1)"

0 commit comments

Comments
 (0)