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

GH-3190: Set working directory before getting the build context #3230

Conversation

augustoproiete
Copy link
Member

@augustoproiete augustoproiete commented Mar 3, 2021

Closes #3190


After this PR:

C:\augustoproiete\TestFrostingWorkDir>dotnet run -w C:\Temp
Context ctor C:/Temp

========================================
Hello
========================================
Hello task C:/Temp

========================================
Default
========================================

Task                          Duration
--------------------------------------------------
Hello                         00:00:00.0039034
--------------------------------------------------
Total:                        00:00:00.0045129

@augustoproiete augustoproiete force-pushed the fix-working-dir-on-build-context-ctor branch from 8b2734e to 24f10db Compare March 4, 2021 03:55
Copy link
Member

@pascalberger pascalberger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will change where tools will be restored. With 1.0 it will restore them to the directory from where it was started, with this PR it will restore to the working directory passed as parameter. Is this the expected behavior?

@augustoproiete
Copy link
Member Author

@pascalberger I believe it is... Fixes regression #3058

Copy link
Member

@pascalberger pascalberger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested also with UseWorkingDirectory which now also behaves like pre 1.0 RC2, which fixes additionally #3058

@augustoproiete augustoproiete merged commit 7cf0dc0 into cake-build:develop Mar 4, 2021
@augustoproiete augustoproiete deleted the fix-working-dir-on-build-context-ctor branch March 4, 2021 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Working directory is not respected in BuildContext constructor
3 participants