Skip to content

os.getAppFilename() returns incorrect results on OpenBSD #12389

@euantorano

Description

@euantorano

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...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions