Skip to content

Commit d6bfe0c

Browse files
committed
chore: first argument to spawn can be a command if it is on the PATH
1 parent fac79b8 commit d6bfe0c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ class DLanguageClient extends AutoLanguageClient {
9999

100100
startServerProcess (projectPath) {
101101
return super.spawn(
102-
getExePath('serve-d'), // path to the LSP executable.
102+
getExePath('serve-d'), // path to the LSP executable (or the exe name if it is on the PATH)
103103
[], // args passed to spawn the exe
104104
{ cwd: projectPath } // child process spawn options
105105
)

lib/auto-languageclient.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -283,9 +283,9 @@ export default class AutoLanguageClient {
283283
* Use this inside the `startServerProcess` override if the language server is a general executable
284284
* Also see the `spawnChildNode` method
285285
*/
286-
protected spawn(lspPath: string, args: string[], options: cp.SpawnOptions = {}): cp.ChildProcess {
287-
this.logger.debug(`starting "${lspPath} ${args.join(' ')}"`);
288-
return cp.spawn(lspPath, args, options);
286+
protected spawn(exe: string, args: string[], options: cp.SpawnOptions = {}): cp.ChildProcess {
287+
this.logger.debug(`starting "${exe} ${args.join(' ')}"`);
288+
return cp.spawn(exe, args, options);
289289
}
290290

291291
/** Spawn a language server using Atom's Nodejs process

0 commit comments

Comments
 (0)