Skip to content

Commit 3a615aa

Browse files
authored
Make sure context is not provided to the package reset command handler (#1661)
* Make sure context is not provided to the package reset command handler Issue: #1660 * Add changelog entry
1 parent 6f0c7d6 commit 3a615aa

File tree

5 files changed

+6
-4
lines changed

5 files changed

+6
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
- Cleanup Swift diagnostics when the source file is moved or deleted ([#1653](https://github.com/swiftlang/vscode-swift/pull/1653))
88
- Make sure newline starts with /// when splitting doc comment ([#1651](https://github.com/swiftlang/vscode-swift/pull/1651))
9+
- Fix error when running `Reset Package Dependencies` command from the Project view ([#1661](https://github.com/swiftlang/vscode-swift/pull/1661))
910

1011
## 2.6.0 - 2025-06-26
1112

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "swift-vscode",
33
"displayName": "Swift",
44
"description": "Swift Language Support for Visual Studio Code.",
5-
"version": "2.6.0",
5+
"version": "2.6.1",
66
"publisher": "swiftlang",
77
"icon": "icon.png",
88
"repository": {

src/commands.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ export function register(ctx: WorkspaceContext): vscode.Disposable[] {
148148
),
149149
vscode.commands.registerCommand(
150150
Commands.RESET_PACKAGE,
151-
async folder => await resetPackage(ctx, folder)
151+
async (_ /* Ignore context */, folder) => await resetPackage(ctx, folder)
152152
),
153153
vscode.commands.registerCommand("swift.runScript", async () => await runSwiftScript(ctx)),
154154
vscode.commands.registerCommand("swift.openPackage", async () => {

test/integration-tests/commands/dependency.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ suite("Dependency Commmands Test Suite @slow", function () {
115115
// spm reset
116116
const result = await vscode.commands.executeCommand(
117117
Commands.RESET_PACKAGE,
118+
undefined,
118119
depsContext
119120
);
120121
expect(result).to.be.true;

0 commit comments

Comments
 (0)