Skip to content

sourcecode.File() does not return full path to current script #493

@eikek

Description

@eikek

Hello,
is it possible to obtain the path to the currently running script? The $0 bash equivalent. I hope I didn't miss it in the configuration, but so far I couldn't find anything related. It's not super important; I'm now using a simple wrapper around amm to export an env var which I then use in my scripts.

#!/usr/bin/env sh
export AMM_SCRIPT="$1"
exec java -jar -Xmx500m -XX:+UseG1GC $JAVA_OPTS ~/bin/_amm "$@"

Maybe ammonite provides this already?

Thank you for this great tool!

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