Skip to content

Pass the script path to scripts #121

@seesharper

Description

@seesharper

I was thinking that it would be quite useful to have access to the script path (main script) from within the script itself.
I see that ScriptCs provides this through Env.ScriptPath which is great apart from the fact that OmniSharp does not recognize the Env type and squiggly lines appears in VS Code.

A simple and possible naive solution might be to pass the path of the main script as the first argument to the script. I guess that would be the WorkingDirectory from the ScriptContext class or something like that.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions