Skip to content
This repository has been archived by the owner on Jun 22, 2024. It is now read-only.

Commit

Permalink
Running default target did not work #94
Browse files Browse the repository at this point in the history
  • Loading branch information
vknabel committed Mar 4, 2021
1 parent a498576 commit 870748e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

## 2.11.2

- Running default target did not work #94

## 2.11.1

- [Disable C and C++ for sourcekit-lsp](https://forums.swift.org/t/disable-sourcekit-lsp-for-c-files/30717/3)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"url": "https://github.com/vknabel"
},
"license": "Apache-2.0",
"version": "2.11.1",
"version": "2.11.2",
"publisher": "vknabel",
"icon": "icons/icon.png",
"galleryBanner": {
Expand Down
16 changes: 10 additions & 6 deletions src/toolchain/SwiftTools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,12 +197,16 @@ export class Toolchain {
setRunning(true);
output.run.clear();
output.run.log(`running ${target ? target : "package"}…`);
const { proc } = this.spawnSwiftProc(["run", target], output.run, (code, signal) => {
// handle termination here
output.run.log(`Process exited. code=${code} signal=${signal}`);
setRunning(false);
this.runProc = undefined;
});
const { proc } = this.spawnSwiftProc(
target ? ["run", target] : ["run"],
output.run,
(code, signal) => {
// handle termination here
output.run.log(`Process exited. code=${code} signal=${signal}`);
setRunning(false);
this.runProc = undefined;
}
);
this.runProc = proc;
}

Expand Down

0 comments on commit 870748e

Please sign in to comment.