8000 [Feature] providing startup folder (--working-directory) · Issue #680 · dotnet-script/dotnet-script · GitHub
[go: up one dir, main page]

Skip to content
[Feature] providing startup folder (--working-directory) #680
Open
@MiloszKrajewski

Description

@MiloszKrajewski

Maybe it can be done somehow already, I just missed it.

I would like my script to start in some specific folder. It is absolutely possible with dotnet-script installed globally, of course, let's say:

pushd execution_folder
dotnet script sources_folder/some_script.csx
popd

The problem is, I want local version of dotnet script (not global) and use global.json from the folder where script is:

pushd sources_folder
dotnet script --working-directory execution_folder some_script.csx
popd

For now, I cannot have both: global.json from source_folder but execution folder somewhere else.

I could, of course, pass it as argument to my some_script.csx and handle it there but it means I would need to do in all my scripts and maybe use some command line parsing library.

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

      0