Skip to content

Commit

Permalink
Implemented cwd inside getPintCommand instead of global command
Browse files Browse the repository at this point in the history
  • Loading branch information
MHO authored and d8vjork committed Dec 26, 2023
1 parent 54fc160 commit d421f4b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/ModuleResolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ export class ModuleResolver {
return;
}

return new PhpCommand(executable, await this.getPintConfigAsArgs(workspaceFolder, input));
const cmd = getWorkspaceConfig('executablePath', path.posix.join(...DEFAULT_EXEC_PATH));

const cwd = executable.replace( cmd, '' );

return new PhpCommand(cmd, await this.getPintConfigAsArgs(workspaceFolder, input), cwd);
}

public async getPintCommandWithinSail(workspaceFolder: WorkspaceFolder, input?: string): Promise<PhpCommand | undefined> {
Expand Down
2 changes: 1 addition & 1 deletion src/PintEditService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ export default class PintEditService implements Disposable {
return false;
}

command.run(workspaceFolder?.uri.fsPath);
command.run();

this.loggingService.logDebug(RUNNING_PINT_ON_PATH, { command: command.toString() });

Expand Down

0 comments on commit d421f4b

Please sign in to comment.