Skip to content

Commit

Permalink
Switch to const as requested
Browse files Browse the repository at this point in the history
  • Loading branch information
Blaisorblade committed Feb 10, 2023
1 parent 5fc3386 commit faf3152
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions server/src/coqtop/CoqTop8.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,17 +250,16 @@ export class CoqTop extends IdeSlave8 implements coqtop.CoqTop {
...this.settings.args
];
}
if (this.settings.useDune) {
var binary = this.settings.dunePath
if (scriptPath === undefined)
throw new CoqtopSpawnError("", "File was not saved to local file system");
var args = ["coq", "top", "--toplevel=" + coqtopModule,
scriptPath, "--", ...coqArgs];
} else {
var binary = coqtopModule
var args = coqArgs

if (this.settings.useDune && scriptPath === undefined) {
throw new CoqtopSpawnError("", "File was not saved to local file system");
}

const [binary, args] = this.settings.useDune ?
[this.settings.dunePath, ["coq", "top", "--toplevel=" + coqtopModule,
scriptPath, "--", ...coqArgs]] :
[coqtopModule, coqArgs]

this.console.log('exec: ' + binary + ' ' + args.join(' '));
return spawn(binary, args, { detached: false, cwd: this.projectRoot });
}
Expand Down

0 comments on commit faf3152

Please sign in to comment.