Fix issues with package management subdirectories #12381
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #12140 - Fsc deletes the output directory
Fixes #11923 - FSI fails with "error FS3217: No such file or directory"
Additionally, this makes working directory evaluation lazy ... so it doesn't touch the disk unless nuget evaluation is actually required.
#12140 - Fsc deletes the output directory
The output directory deletion was because, we pass the directory from --out: to the package manager, the pm intended to create use and delete a subdirectory from that, however, due to a bug it didn't. Instead it used the directory from --out: and tried to delete that.
Fixes #11923 - FSI fails with "error FS3217: No such file or directory"
This failed because when no directory is specified the package manager created a directory in the temp directory named
nuget/Some randomized directory name.On linux, if the
tempdir/nugethad been created by a different user, e.g. the sudo admin user, then subsequent scri0pts not run with that user would fail.This modification simply eliminates the common part of the path. So the script should be able to write using whatever user is executing the code.