Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,11 @@
"default": "output",
"description": "Where to print the output of tasks. Note that the output panel does not support ANSI colors."
},
"outputToNewTerminal": {
"type": "boolean",
"default": false,
"description": "When using outputTo=terminal whether to use a new Terminal instance or reuse the last instance."
},
"checkForUpdates": {
"type": "boolean",
"default": true,
Expand Down Expand Up @@ -354,4 +359,4 @@
"semver": "^7.5.0",
"strip-ansi": "6.0.1"
}
}
}
2 changes: 1 addition & 1 deletion src/services/taskfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ class TaskfileService {
if (settings.outputTo === "terminal") {
log.info(`Running task: "${taskName} ${cliArgs}" in: "${dir}"`);
var terminal: vscode.Terminal;
if (vscode.window.activeTerminal !== undefined) {
if (vscode.window.activeTerminal !== undefined && settings.outputToNewTerminal === false) {
terminal = vscode.window.activeTerminal;
} else {
terminal = vscode.window.createTerminal("Task");
Expand Down
2 changes: 2 additions & 0 deletions src/utils/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ class Settings {
public updateOn!: string;
public path!: string;
public outputTo!: string;
public outputToNewTerminal!: boolean;
public checkForUpdates!: boolean;
public treeNesting!: boolean;
public treeSort!: string;
Expand All @@ -29,6 +30,7 @@ class Settings {
this.updateOn = config.get("updateOn") ?? "change";
this.path = config.get("path") ?? "task";
this.outputTo = config.get("outputTo") ?? "output";
this.outputToNewTerminal = config.get("outputToNewTerminal") ?? false;
this.checkForUpdates = config.get("checkForUpdates") ?? true;
this.treeNesting = config.get("tree.nesting") ?? true;
this.treeSort = config.get("tree.sort") ?? "default";
Expand Down