fix(brew): Incorrect profile.d/brew.sh file $- text writing

`$-` is now no longer writing random character, but `$-` instead to the file.
This commit is contained in:
fiftydinar 2024-10-11 08:36:08 +02:00 committed by GitHub
parent 8e582d701b
commit 4d53e8159b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -209,7 +209,7 @@ if [[ ! -f "/etc/profile.d/brew.sh" ]]; then
echo "Apply brew path export fix, to solve path conflicts between system & brew programs with same name"
cat > /etc/profile.d/brew.sh <<EOF
#!/usr/bin/env bash
[[ -d /home/linuxbrew/.linuxbrew && $- == *i* ]] && eval "\$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
[[ -d /home/linuxbrew/.linuxbrew && \$- == *i* ]] && eval "\$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
EOF
fi