astoff / comint-mime

Display graphics and other MIME attachments in Emacs shells
67 stars 6 forks source link

realpath on Mac does not accept -e flag #17

Closed sje30 closed 1 year ago

sje30 commented 1 year ago

In the comint-mime.sh script, line 22:

    file=$(realpath -e "$1") || return 1

the -e flag on linux indicates that 'all components of the path must exist'

This -e flag doesn't exist on Mac version of realpath in /bin. Instead realpath will error if the file does not exist. So on Mac, the -e flag can be deleted to have the same effect as realpath on linux (it seems).

astoff commented 1 year ago

Thanks for letting me know!