Skip to content

Commit

Permalink
Merge pull request #198337 from microsoft/merogge/task-folder
Browse files Browse the repository at this point in the history
use `cwd` if it exists in task presentation options
  • Loading branch information
meganrogge authored Nov 15, 2023
2 parents 2938e5d + 7c2c501 commit 9998f63
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/vs/workbench/contrib/tasks/browser/terminalTaskSystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1174,10 +1174,12 @@ export class TerminalTaskSystem extends Disposable implements ITaskSystem {
shellLaunchConfig.args = windowsShellArgs ? combinedShellArgs.join(' ') : combinedShellArgs;
if (task.command.presentation && task.command.presentation.echo) {
if (needsFolderQualification && workspaceFolder) {
const folder = cwd ? path.posix.basename(cwd.toString()) : workspaceFolder.name;
shellLaunchConfig.initialText = this.taskShellIntegrationStartSequence(cwd) + formatMessageForTerminal(nls.localize({
key: 'task.executingInFolder',
comment: ['The workspace folder the task is running in', 'The task command line or label']
}, 'Executing task in folder {0}: {1}', workspaceFolder.name, commandLine), { excludeLeadingNewLine: true }) + this.taskShellIntegrationOutputSequence;

}, 'Executing task in folder {0}: {1}', folder, commandLine), { excludeLeadingNewLine: true }) + this.taskShellIntegrationOutputSequence;
} else {
shellLaunchConfig.initialText = this.taskShellIntegrationStartSequence(cwd) + formatMessageForTerminal(nls.localize({
key: 'task.executing.shellIntegration',
Expand Down

0 comments on commit 9998f63

Please sign in to comment.