Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option for ProcessSettings to opt out of working directory magic #2224

Closed
patriksvensson opened this issue Aug 1, 2018 · 0 comments
Closed
Assignees
Labels
Milestone

Comments

@patriksvensson
Copy link
Member

When starting a process from Cake I encountered a problem.

    context.StartProcess("autorest.cmd", new ProcessSettings {
        Arguments = new ProcessArgumentBuilder()
            .AppendSwitchQuoted("--input-file", "=", input)
            .Append("--add-credentials")
            .Append("--csharp")
    });

Since autorest.cmd works with the working directory, and Cake set the process' working directory to the current one (where we execute the build script), autorest.cmd will try to find it's dependencies such as ``node_modules` in the script directory which will fail.

Suggestion:
I think we should add an option to not use the working directory at all. This would make it possible to opt out from the behavior while still not break any other applications.

@patriksvensson patriksvensson self-assigned this Aug 1, 2018
@patriksvensson patriksvensson added this to the v0.30.0 milestone Aug 1, 2018
paulomorgado pushed a commit to paulomorgado/cake-build-cake that referenced this issue Sep 17, 2018
* patriksvensson-feature/cake-buildGH-2224:
  Allow opting out from using working directory.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant