Skip to content

Commit a972953

Browse files
authored
Merge pull request #715 from afdw/vscoq-path-cmd
Run `vscoq.path` as a shell command from the project directory
2 parents b257360 + 25c3357 commit a972953

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

client/src/utilities/toolchain.ts

+7-3
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,11 @@ export default class VsCoqToolchainManager implements Disposable {
6363
const config = workspace.getConfiguration('vscoq');
6464
const serverOptions : ServerOptions = {
6565
command: this._vscoqtopPath,
66-
args: config.args
66+
args: config.args,
67+
options: {
68+
cwd: workspace.rootPath,
69+
shell: true,
70+
},
6771
};
6872
return serverOptions;
6973
};
@@ -125,7 +129,7 @@ export default class VsCoqToolchainManager implements Disposable {
125129
const cmd = [this._vscoqtopPath].concat(options).join(' ');
126130

127131
return new Promise((resolve, reject: ((reason: ToolchainError) => void)) => {
128-
exec(cmd, (error, stdout, stderr) => {
132+
exec(cmd, {cwd: workspace.rootPath}, (error, stdout, stderr) => {
129133

130134
if(error) {
131135
reject({
@@ -160,7 +164,7 @@ export default class VsCoqToolchainManager implements Disposable {
160164
const cmd = [this._vscoqtopPath].concat(options).join(' ');
161165

162166
return new Promise((resolve, reject: (reason: string) => void) => {
163-
exec(cmd, (error, stdout, stderr) => {
167+
exec(cmd, {cwd: workspace.rootPath}, (error, stdout, stderr) => {
164168
if(error) {
165169
reject(stderr);
166170
} else {

0 commit comments

Comments
 (0)