-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
fix workspace preference provider #2083
fix workspace preference provider #2083
Conversation
@@ -25,6 +25,13 @@ export abstract class AbstractResourcePreferenceProvider extends PreferenceProvi | |||
@postConstruct() | |||
protected async init(): Promise<void> { | |||
const uri = await this.getUri(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please update a return type of getUri
accordingly, i.e. MaybePromise<URI | undefined>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -22,7 +22,7 @@ export class WorkspacePreferenceProvider extends AbstractResourcePreferenceProvi | |||
const rootUri = new URI(root.uri); | |||
return rootUri.resolve('.theia').resolve('settings.json'); | |||
} | |||
return new Promise<URI>(() => { }); | |||
return new Promise<URI>(resolve => resolve()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return undefined;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>
5739f7c
to
2d4128a
Compare
@akosyakov review, please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thx!
If Theia starts without opened workspace then method
getUri()
of WorkspacePreferenceProvider returns a promise which never becomes resolved. Hence, WorkspacePreferenceProvider can't be initialized as well.Signed-off-by: Oleksii Kurinnyi okurinny@redhat.com