Skip to content

Commit

Permalink
test: get output from executeWorkspaceOSCommand
Browse files Browse the repository at this point in the history
  • Loading branch information
ahtrotta committed Aug 23, 2023
1 parent a8ac0ab commit 5e7d554
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions test/integration/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,15 +237,18 @@ async function closeAllEditors(): Promise<void> {
await vscode.commands.executeCommand('workbench.action.closeAllEditors');
}

export async function executeWorkspaceOSCommand(cmd: string, workspaceName: string): Promise<void> {
return new Promise<void>((resolve, reject) => {
export async function executeWorkspaceOSCommand(
cmd: string,
workspaceName: string
): Promise<string> {
return new Promise<string>((resolve, reject) => {
exec(cmd, { cwd: workspaceName }, (err, stdout, stderr) => {
if (err) {
console.log(stdout);
console.warn(stderr);
return reject(err);
}
resolve();
resolve(stdout);
});
});
}
Expand Down

0 comments on commit 5e7d554

Please sign in to comment.