Skip to content

Commit

Permalink
refactor: don't use readlink
Browse files Browse the repository at this point in the history
  • Loading branch information
un-def committed May 4, 2024
1 parent 2837283 commit 585a00f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 20 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ jobs:
if: runner.os == 'macOS'
run: |
brew install zsh
- name: Install coreutils on macOS
if: runner.os == 'macOS'
run: |
brew install coreutils
- name: Install tox
run: |
python -m pip install tox
Expand Down
17 changes: 1 addition & 16 deletions src/luamb/_shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

# Dependencies
#
# readlink (or greadlink)
# cat
# uname
# sed
Expand All @@ -28,9 +27,6 @@
# expanded/calculated version of LUAMB_ENVS_DIR.
# Set in _entrypoint.py.
#
# __luamb_readlink
# A name of the readlink binary ('readlink' or 'greadlink').
#
# __luamb_orig_ps1
# The original value of the PS1 variable.
# Unset if no active environment.
Expand Down Expand Up @@ -80,7 +76,7 @@
local env_name=$1
__luamb_check_env_name "$env_name" || return 1
local env_path
env_path=$($__luamb_readlink -e "$__luamb_envs_dir/$env_name")
env_path=$__luamb_envs_dir/$env_name
if [ ! -d "$env_path" ]; then
echo "environment doesn't exist: $env_name"
return 1
Expand Down Expand Up @@ -146,17 +142,6 @@
}
if [ "$(uname)" = "Darwin" ]; then
__luamb_readlink="greadlink"
if ! __luamb_check_exists $__luamb_readlink; then
echo "luamb: greadlink not found, install coreutils:"
echo "brew install coreutils"
return 1
fi
else
__luamb_readlink="readlink"
fi
export LUAMB_ACTIVE_ENV=""
if [ "$LUAMB_DISABLE_COMPLETION" != "true" ]; then
Expand Down

0 comments on commit 585a00f

Please sign in to comment.