madelson / MedallionShell

A .NET library simplifying the execution and chaining of processes
MIT License
415 stars 32 forks source link

Support relative paths #118

Open Bartleby2718 opened 6 months ago

Bartleby2718 commented 6 months ago

Filing a separate issue (per https://github.com/madelson/MedallionShell/pull/111#discussion_r1615359632) to avoid a scope creep

Bartleby2718 commented 6 months ago

Sample LINQPad code on Windows #116):

void Main()
{
    Command.Run(
        @"C:\Program Files\dotnet\dotnet.exe",
        new[] { "--version" })
        .GetOutputAndErrorLines()
        .Dump();
}

but the following fails:

void Main()
{
    Command.Run(
        @".\dotnet.exe",
        new[] { "--version" },
        o => o.WorkingDirectory(@"C:\Program Files\dotnet\"))
        .GetOutputAndErrorLines()
        .Dump();
}
Bartleby2718 commented 6 months ago

@madelson This doesn't have to be an option, right?

Bartleby2718 commented 6 months ago

^A pull request has been staged. Will file a PR in this repo if all tests pass and the Mono PR is merged.