Skip to content

Commit b60a7bd

Browse files
authored
Fix binary copying to temporary folder on custom path (#502)
When you set a custom path for the CLI through `dafny.cliPath`, and set `dafny.version` to `custom`, in theory, the extension should copy all relevant DLL and executable files in the `dafny.cliPath` to a tmp dir, which is then used to launch the language server. This is implemented by iterating over all files in the directory of the configured path, and copying only the ones which match a given filter: names ending with `.dll`, `.exe`, etc. On Linux, executables usually won't have those file extensions, and thus, the file the user configured path points to might end up not being copied. This leads to language server failing because it can't find the file specified in `dafny.cliPath`. This PR simply changes the filter so that the file pointed to always passes the filter, so that it always ends up getting copied.
1 parent 542c1c0 commit b60a7bd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/language/customPathInstaller.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ export class CustomPathInstaller {
107107
|| file.endsWith('.exe')
108108
|| file === 'z3'
109109
|| file === 'DafnyPrelude.bpl'
110-
|| file === 'runtimes')) {
110+
|| file === 'runtimes'
111+
|| file === executableName)) {
111112
continue;
112113
}
113114
// eslint-disable-next-line max-depth

0 commit comments

Comments
 (0)