Skip to content

Deno.execPath() resolves symlink on Linux (doesn’t on Mac) #17464

@mxcl

Description

@mxcl
$ echo "console.log(Deno.execPath())" > foo.ts
$ deno compile -A foo.ts
$ ./foo
/src/foo
ln -s foo bar
$ ./bar
/src/foo

On macOS the output is /src/bar. Resolving the symlink is not typical, many tools use the name of the symlink to change behavior, which is what we are trying to do.

I will happily PR a fix, just point me at the relevant source file and where I should add a regression test. Thanks.

$ deno --version
deno 1.29.2 (release, aarch64-unknown-linux-gnu)
v8 10.9.194.5
typescript 4.9.4

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