Skip to content

Commit

Permalink
ProcessExecution -> ShellExecution to fix #181.
Browse files Browse the repository at this point in the history
  • Loading branch information
lukester1975 authored and tristan957 committed Nov 16, 2023
1 parent 3e9cd23 commit 5a103c4
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/tasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function createTestTask(t: Test, buildDir: string, isBenchmark: boolean) {
{ type: "meson", mode, target: name },
`Test ${name}`,
"Meson",
new vscode.ProcessExecution(extensionConfiguration("mesonPath"), args, {
new vscode.ShellExecution(extensionConfiguration("mesonPath"), args, {
cwd: buildDir,
}),
);
Expand All @@ -43,7 +43,7 @@ function createRunTask(t: Target, targetName: string) {
},
`Run ${targetDisplayName}`,
"Meson",
new vscode.ProcessExecution(t.filename[0], {
new vscode.ShellExecution(t.filename[0], {
cwd: workspaceState.get<string>("mesonbuild.sourceDir")!,
env: getEnvDict(),
}),
Expand All @@ -61,7 +61,7 @@ function createReconfigureTask(buildDir: string, sourceDir: string) {
{ type: "meson", mode: "reconfigure" },
"Reconfigure",
"Meson",
new vscode.ProcessExecution(extensionConfiguration("mesonPath"), args),
new vscode.ShellExecution(extensionConfiguration("mesonPath"), args),
);
}

Expand All @@ -71,14 +71,14 @@ export async function getMesonTasks(buildDir: string, sourceDir: string) {
{ type: "meson", mode: "build" },
"Build all targets",
"Meson",
new vscode.ProcessExecution(extensionConfiguration("mesonPath"), ["compile", "-C", buildDir]),
new vscode.ShellExecution(extensionConfiguration("mesonPath"), ["compile", "-C", buildDir]),
"$meson-gcc",
);
const defaultTestTask = new vscode.Task(
{ type: "meson", mode: "test" },
"Run all tests",
"Meson",
new vscode.ProcessExecution(
new vscode.ShellExecution(
extensionConfiguration("mesonPath"),
["test", ...extensionConfiguration("testOptions")],
{ cwd: buildDir },
Expand All @@ -88,7 +88,7 @@ export async function getMesonTasks(buildDir: string, sourceDir: string) {
{ type: "meson", mode: "benchmark" },
"Run all benchmarks",
"Meson",
new vscode.ProcessExecution(
new vscode.ShellExecution(
extensionConfiguration("mesonPath"),
["test", "--benchmark", ...extensionConfiguration("benchmarkOptions")],
{ cwd: buildDir },
Expand All @@ -99,13 +99,13 @@ export async function getMesonTasks(buildDir: string, sourceDir: string) {
{ type: "meson", mode: "install" },
"Run install",
"Meson",
new vscode.ProcessExecution(extensionConfiguration("mesonPath"), ["install"], { cwd: buildDir }),
new vscode.ShellExecution(extensionConfiguration("mesonPath"), ["install"], { cwd: buildDir }),
);
const defaultCleanTask = new vscode.Task(
{ type: "meson", mode: "clean" },
"Clean",
"Meson",
new vscode.ProcessExecution(extensionConfiguration("mesonPath"), ["compile", "--clean"], { cwd: buildDir }),
new vscode.ShellExecution(extensionConfiguration("mesonPath"), ["compile", "--clean"], { cwd: buildDir }),
);
defaultBuildTask.group = vscode.TaskGroup.Build;
defaultTestTask.group = vscode.TaskGroup.Test;
Expand Down Expand Up @@ -146,7 +146,7 @@ export async function getMesonTasks(buildDir: string, sourceDir: string) {
def,
`Build ${targetName}`,
"Meson",
new vscode.ProcessExecution(extensionConfiguration("mesonPath"), ["compile", targetName], {
new vscode.ShellExecution(extensionConfiguration("mesonPath"), ["compile", targetName], {
cwd: buildDir,
}),
"$meson-gcc",
Expand Down

0 comments on commit 5a103c4

Please sign in to comment.