Skip to content

Commit

Permalink
dorothy, fs-realpath: realpath on alpine doesn't support options
Browse files Browse the repository at this point in the history
  • Loading branch information
balupton committed Oct 15, 2024
1 parent acee8c9 commit 06a2cae
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion commands/dorothy
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,9 @@ function dorothy_() (
local gnu_realpath=''
if __command_exists -- grealpath; then
gnu_realpath='grealpath'
elif __command_exists -- realpath && __is_linux; then
elif __command_exists -- realpath && __is_linux && ! __is_alpine; then
# alpine realpath doesn't support any options, so missing --canonicalize-existing and --canonicalize-missing
# https://github.com/bevry/dorothy/actions/runs/11337594338/job/31529440618#step:4:36
gnu_realpath='realpath'
fi

Expand Down
4 changes: 3 additions & 1 deletion commands/fs-realpath
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ function fs_realpath() (
local gnu_realpath
if __command_exists -- grealpath; then
gnu_realpath='grealpath'
elif __command_exists -- realpath && is-linux; then
elif __command_exists -- realpath && is-linux && ! is-alpine; then
# alpine realpath doesn't support any options, so missing --canonicalize-existing and --canonicalize-missing
# https://github.com/bevry/dorothy/actions/runs/11337594338/job/31529440618#step:4:36
gnu_realpath='realpath'
else
return 45 # ENOTSUP 45 Operation not supported
Expand Down

0 comments on commit 06a2cae

Please sign in to comment.