Skip to content

Commit

Permalink
Merge pull request #715 from afdw/vscoq-path-cmd
Browse files Browse the repository at this point in the history
Run `vscoq.path` as a shell command from the project directory
  • Loading branch information
rtetley authored Jan 30, 2024
2 parents b257360 + 25c3357 commit a972953
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions client/src/utilities/toolchain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@ export default class VsCoqToolchainManager implements Disposable {
const config = workspace.getConfiguration('vscoq');
const serverOptions : ServerOptions = {
command: this._vscoqtopPath,
args: config.args
args: config.args,
options: {
cwd: workspace.rootPath,
shell: true,
},
};
return serverOptions;
};
Expand Down Expand Up @@ -125,7 +129,7 @@ export default class VsCoqToolchainManager implements Disposable {
const cmd = [this._vscoqtopPath].concat(options).join(' ');

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

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

return new Promise((resolve, reject: (reason: string) => void) => {
exec(cmd, (error, stdout, stderr) => {
exec(cmd, {cwd: workspace.rootPath}, (error, stdout, stderr) => {
if(error) {
reject(stderr);
} else {
Expand Down

0 comments on commit a972953

Please sign in to comment.