Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check getCurrentDirectory availability in getEffectiveTypeRoots #9396

Merged
merged 2 commits into from
Jun 28, 2016

Conversation

zhengbli
Copy link
Contributor

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

@@ -113,6 +113,7 @@ namespace ts.server {
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