Skip to content

Commit 080122e

Browse files
author
Kartik Raj
committed
z
1 parent f187bdd commit 080122e

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed
Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License.
33

4-
import { EnvironmentVariables, ShellOptions } from './types';
4+
import * as path from 'path';
5+
import { executeWorkerFile } from './main';
6+
import { EnvironmentVariables, ExecutionResult, ShellOptions } from './types';
57

6-
export function shellExec(_command: string, _options: ShellOptions, _defaultEnv?: EnvironmentVariables): void {
7-
// const processLogger = new ProcessLogger(new WorkspaceService());
8-
// processLogger.logProcess(command, undefined, options);
9-
// return executeWorkerFile(path.join(__dirname, 'shellExecWorker.js'), {
10-
// command,
11-
// options,
12-
// defaultEnv,
13-
// disposables,
14-
// });
8+
export function shellExec(
9+
command: string,
10+
options: ShellOptions,
11+
defaultEnv?: EnvironmentVariables,
12+
): Promise<ExecutionResult<string>> {
13+
return executeWorkerFile(path.join(__dirname, 'shellExecWorker.js'), {
14+
command,
15+
options,
16+
defaultEnv,
17+
});
1518
}

0 commit comments

Comments
 (0)