It looks like os.getAppFilename() returns an incorrect path on OpenBSD.
I create the following file in /home/euan/src/appdir/test.nim:
import os
const compilerExe = getCurrentCompilerExe()
echo "compiler: ", compilerExe
echo "app filename: ", getAppFilename()
echo "app dir: ", getAppDir()
Compiled it with nim --cc:clang test.nim then ran it. The output was:
compiler: /home/euan/src/nim-1.0.0/bin/nim
app filename: /bin/test
app dir: /bin
The compiler is the only one that is correct - the app filename should be /home/euan/src/appdir/test.
I wonder if this is related to #12320 and #12139...