If I pass the full path, it complains since the current directory is automatically tacked on. Only works if i specify a path relative to the current directory.
#doesn't work but should:
$ player play ~/.local/share/sounds/CRASH_6.mp3
events.js:72
throw er; // Unhandled 'error' event
^
Error: ENOENT, open '/home/yuvilio/home/yuvilio/.local/share/sounds/CRASH_6.mp3'
#works but too restricting:
$ player play .local/share/sounds/CRASH_6.mp3
$
Can we specify the path either way and the script will just use that?
My workaround is to wrap it in a subprocess using $(...) and change directory temporarily to the root so that my directory in my main process isn't changed:
$ echo $BEEPMP3
/home/yuvilio/.local/share/sounds/CRASH_6.mp3
$ pwd
/home/yuvilio/.local/share
$ $(cd /; player play $BEEPMP3)
$