mirror of
https://github.com/wfxr/forgit.git
synced 2026-09-10 07:16:23 -04:00
Do not hardcode $SHELL path for bash (#260)
Some systems do not have /bin/bash. e.g., Alpine and NixOS. This change reads the path dynamically via `which`. It solves the error `fork/exec /bin/bash`.
This commit is contained in:
parent
f8c0edfc17
commit
8ca463b5c6
|
|
@ -12,8 +12,11 @@
|
|||
# This gives users the choice to set aliases inside of their git config instead
|
||||
# of their shell config if they prefer.
|
||||
|
||||
# Set shell for fzf preview commands
|
||||
SHELL=/bin/bash
|
||||
# Disable shellcheck for "which", because it suggests "command -v xxx" instead,
|
||||
# which is not a working replacement.
|
||||
# See https://github.com/koalaman/shellcheck/issues/1162
|
||||
# shellcheck disable=2230
|
||||
SHELL="$(which bash)" # Set shell for fzf preview commands
|
||||
|
||||
# Get absolute forgit path
|
||||
FORGIT=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)/$(basename -- "${BASH_SOURCE[0]}")
|
||||
|
|
|
|||
Loading…
Reference in a new issue