mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Merge 42fd25bd11 into 9453c8c0c9
This commit is contained in:
commit
92ab0a764a
2 changed files with 2 additions and 2 deletions
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
# Function to remove shim from PATH (POSIX-compliant)
|
# Function to remove shim from PATH (POSIX-compliant)
|
||||||
remove_shim_from_path() {
|
remove_shim_from_path() {
|
||||||
_safe_chain_phys=$(CDPATH= cd -- "$(dirname -- "$0")" 2>/dev/null && pwd -P)
|
_safe_chain_phys=$(CDPATH= cd -- "$(dirname -- "$0")" >/dev/null 2>/dev/null && pwd -P)
|
||||||
if [ -z "$_safe_chain_phys" ]; then
|
if [ -z "$_safe_chain_phys" ]; then
|
||||||
echo "$PATH"
|
echo "$PATH"
|
||||||
return
|
return
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ elif [ -n "${ZSH_VERSION:-}" ]; then
|
||||||
else
|
else
|
||||||
_sc_script_path="$0"
|
_sc_script_path="$0"
|
||||||
fi
|
fi
|
||||||
_sc_scripts_dir=$(CDPATH= cd -- "$(dirname -- "$_sc_script_path")" 2>/dev/null && pwd -P)
|
_sc_scripts_dir=$(CDPATH= cd -- "$(dirname -- "$_sc_script_path")" >/dev/null 2>/dev/null && pwd -P)
|
||||||
_sc_base=$(dirname -- "$_sc_scripts_dir")
|
_sc_base=$(dirname -- "$_sc_scripts_dir")
|
||||||
export PATH="$PATH:${_sc_base}/bin"
|
export PATH="$PATH:${_sc_base}/bin"
|
||||||
unset _sc_base _sc_script_path _sc_scripts_dir
|
unset _sc_base _sc_script_path _sc_scripts_dir
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue