Skip to content

Commit

Permalink
Remove options from runCmd
Browse files Browse the repository at this point in the history
  • Loading branch information
Lencerf committed Mar 26, 2021
1 parent 393bf1b commit 17289c1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
6 changes: 1 addition & 5 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,6 @@ export class Extension {
this.logger.appendLine(
`running ${python3Path} ${pyArgs} to refresh data...`,
);
const cwd = vscode.workspace.workspaceFolders ?
vscode.workspace.workspaceFolders[0].uri.fsPath :
undefined;
runCmd(
python3Path,
pyArgs,
Expand All @@ -171,8 +168,7 @@ export class Extension {
this.completer.updateData(errorsCompletions[1]);
this.logger.appendLine('Data refreshed.');
},
cwd ? {cwd} : undefined,
(str) => this.logger.append(str),
(str) => this.logger.append(str),
);
}

Expand Down
3 changes: 1 addition & 2 deletions src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import {spawn, SpawnOptions} from 'child_process';
import {spawn} from 'child_process';

export function runCmd(
cmd: string,
args: string[],
callBack: (stdout: string) => void,
options?: SpawnOptions,
logger?: (str: string) => void,
) {
const child = spawn(cmd, args);
Expand Down

0 comments on commit 17289c1

Please sign in to comment.