Skip to content

Commit

Permalink
Fix Linux Update (#1874)
Browse files Browse the repository at this point in the history
* add additional test for acquire status

this bug could exist with the current tests, need to prevent this bug.

* remove the extra update
  • Loading branch information
nagilson authored Jul 12, 2024
1 parent e4ef136 commit ac6de3d
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
6 changes: 5 additions & 1 deletion vscode-dotnet-runtime-extension/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning].

## [Unreleased]

## [2.0.9] - 2024-??-??
## [2.0.9] - 2024-07-12

Fixes a bug where permissions were not granted to run the .NET Installer. (EPERM issue.)

Expand All @@ -17,6 +17,10 @@ Performance improvements.

Fixes a bug with apt-get lock holding (status 100) on Linux with package management.

Adds acquireStatus support for ASP.NET runtime installs.

Other bug fixes.

## [2.0.8] - 2024-07-09

Fixes issues with offline detection and timeouts.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -372,4 +372,21 @@ suite('DotnetCoreAcquisitionExtension End to End', function()
await testAcquire('aspnetcore');
}).timeout(standardTimeoutTime);

test('acquireStatus does respect Mode', async () =>
{
const runtimeContext : IDotnetAcquireContext = { version: '5.0', requestingExtensionId, mode: 'runtime' };
const aspNetContext : IDotnetAcquireContext = { version: '5.0', requestingExtensionId, mode: 'aspnetcore' };

let result = await vscode.commands.executeCommand<IDotnetAcquireResult>('dotnet.acquireStatus', runtimeContext);
assert.notExists(result);
result = await vscode.commands.executeCommand<IDotnetAcquireResult>('dotnet.acquireStatus', aspNetContext);
assert.notExists(result);

result = await vscode.commands.executeCommand<IDotnetAcquireResult>('dotnet.acquire', runtimeContext);
assert.exists(result);

result = await vscode.commands.executeCommand<IDotnetAcquireResult>('dotnet.acquireStatus', aspNetContext);
assert.equal(undefined, result, 'Acquire Status for no ASP.NET installed when Runtime is installed should not mistake Runtime Install as ASP.NET Install');
}).timeout(standardTimeoutTime);

});
3 changes: 0 additions & 3 deletions vscode-dotnet-runtime-library/distro-data/distro-support.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
"commandParts": [
"-o",
"DPkg::Lock::Timeout=120",
"update",
"||",
"apt-get",
"update"
]
},
Expand Down

0 comments on commit ac6de3d

Please sign in to comment.