Skip to content

Commit

Permalink
Merge branch 'hotfix/3.4.2'
Browse files Browse the repository at this point in the history
* hotfix/3.4.2:
  (#46) Fix use of BasePath throwing exception
  (#46) Fix incorrect variable used as lock directory base
  (build) Starhing building 3.4.2 on new hotfix branch
  • Loading branch information
AdmiringWorm committed Aug 2, 2023
2 parents daf48dd + d73a6a8 commit 98878d8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build/config.props
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<!-- when changing any of the NuGetVersion props below, run tools-local\ship-public-apis -->
<MajorNuGetVersion Condition="'$(MajorNuGetVersion)' == ''">3</MajorNuGetVersion>
<MinorNuGetVersion Condition="'$(MinorNuGetVersion)' == ''">4</MinorNuGetVersion>
<PatchNuGetVersion Condition="'$(PatchNuGetVersion)' == ''">1</PatchNuGetVersion>
<PatchNuGetVersion Condition="'$(PatchNuGetVersion)' == ''">2</PatchNuGetVersion>
<SemanticVersion Condition=" '$(SemanticVersion)' == '' ">$(MajorNuGetVersion).$(MinorNuGetVersion).$(PatchNuGetVersion)</SemanticVersion>

<!-- ** Change for each new preview/rc -->
Expand Down
5 changes: 4 additions & 1 deletion src/NuGet.Core/NuGet.Common/ConcurrencyUtilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ public async static Task<T> ExecuteWithFileLockedAsync<T>(string filePath,
CancellationToken token,
string lockFileDirectoryPath)
{
var originalBasePath = BasePath;
// We use the field here, as the BasePath variable
// will try to create a lock file, even if the path is not writable by the current user.
string originalBasePath = _basePath;

BasePath = lockFileDirectoryPath;

try
Expand Down
4 changes: 2 additions & 2 deletions src/NuGet.Core/NuGet.Packaging/PackageExtractor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ public static async Task<bool> InstallFromSourceAsync(
// Start - Chocolatey Specific Modification
//////////////////////////////////////////////////////////

var lockDirectory = Path.GetDirectoryName(targetNupkg) ?? Environment.CurrentDirectory;
var lockDirectory = Path.GetDirectoryName(targetPath) ?? Environment.CurrentDirectory;

//////////////////////////////////////////////////////////
// End - Chocolatey Specific Modification
Expand Down Expand Up @@ -645,7 +645,7 @@ public static async Task<bool> InstallFromSourceAsync(
// Start - Chocolatey Specific Modification
//////////////////////////////////////////////////////////

var lockDirectory = Path.GetDirectoryName(targetNupkg) ?? Environment.CurrentDirectory;
var lockDirectory = Path.GetDirectoryName(targetPath) ?? Environment.CurrentDirectory;

//////////////////////////////////////////////////////////
// End - Chocolatey Specific Modification
Expand Down

0 comments on commit 98878d8

Please sign in to comment.