Skip to content

Commit

Permalink
Fix for MSYS2 (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
rashil2000 committed Oct 4, 2021
1 parent 52e2473 commit f3bf989
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions paruz
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if [[ -z $PARUZ ]]; then
elif ! command -v pacman >/dev/null 2>&1; then
echo "Neither paru nor pacman found. Is this Arch?" >&2
exit 1
elif [[ $EUID -eq 0 ]]; then
elif [[ $EUID -eq 0 ]] || [[ -f /usr/bin/msys-2.0.dll ]]; then
PARUZ=pacman
else
PARUZ='sudo pacman'
Expand Down Expand Up @@ -83,7 +83,7 @@ __paruz_list |
fzf \
--multi \
--ansi \
--preview="'${BASH_SOURCE[0]}' __fzf_preview {1}" |
--preview="/usr/bin/env bash '${BASH_SOURCE[0]}' __fzf_preview {1}" |
readarray -t PICKS

if [[ ${#PICKS[@]} -eq 0 ]]; then
Expand Down

0 comments on commit f3bf989

Please sign in to comment.