Skip to content

Conversation

zhengbli
Copy link
Contributor

Fixes #9186
The crash happened because the getEffectiveTypeRoots assumes getCurrentDirectory for the host. Adding to ServerHost solves the problem.

this.moduleResolutionHost = {
fileExists: fileName => this.fileExists(fileName),
readFile: fileName => this.host.readFile(fileName),
getCurrentDirectory: () => this.host.getCurrentDirectory(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the tsserver install location, correct? do not see how this can be useful.

…ost as it is always the installation location
@zhengbli zhengbli changed the title Add getCurrentDirectory to ServerHost Check getCurrentDirectory availability in getEffectiveTypeRoots Jun 28, 2016
@mhegazy
Copy link
Contributor

mhegazy commented Jun 28, 2016

👍

@zhengbli zhengbli merged commit 50177b1 into microsoft:master Jun 28, 2016
@zhengbli zhengbli deleted the fix9186 branch June 28, 2016 20:01
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants