-
Notifications
You must be signed in to change notification settings - Fork 176
Added '--cache-path' command line option #778
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
Added '--cache-path' command line option #778
Conversation
Added a new command-line option "--cache-path" (or "-p") to allow users to specify the temporary directory used to build the script. This is equivalent to the 'DOTNET_SCRIPT_CACHE_LOCATION' environment but is far more convenient when scripts are run as part of MSBuild. In particular, parallel runs of a script can specify different cache paths preventing the "script.csproj is in use" failure that can happen. (Re: issues dotnet-script#507, dotnet-script#596, dotnet-script#540)
| Assert.False(thirdResultOfScriptB.Cached); | ||
| } | ||
|
|
||
| [Fact] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you additionally update these tests so that all of them are executed for both default cache path and custom path?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, will do.
|
Thanks a lot for the PR! I think this is a very welcome addition 😄 |
| <Project Sdk="Microsoft.NET.Sdk"> | ||
| <PropertyGroup> | ||
| <Description>A cross platform library allowing you to run C# (CSX) scripts with support for debugging and inline NuGet packages. Based on Roslyn.</Description> | ||
| <VersionPrefix>1.6.0</VersionPrefix> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you rev all of these up to 1.7.0?
|
The linux test failures are unrelated to your PR. They will be resolved once we merge #779 |
Ah, I was wondering about these errors. Good to know, thanks |
|
thanks! |
Added a new command-line option "--cache-path" (or "-p") to allow users to specify the temporary directory used to build the script. This is equivalent to the 'DOTNET_SCRIPT_CACHE_LOCATION' environment variable but is far more convenient when scripts are run as part of MSBuild. In particular, parallel runs of a script can specify different cache paths preventing the "script.csproj is in use" error that can happen. (Re: issues #507, #596, #540)
For example,