Skip to content
This repository was archived by the owner on Dec 8, 2020. It is now read-only.

Commit b042e8b

Browse files
authored
Fix "rust.rls.revealOutputChannelOn" (#292)
1 parent 20f48b7 commit b042e8b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/components/configuration/RlsConfiguration.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,17 +157,16 @@ function getUserEnv(): object {
157157

158158
function getUserRevealOutputChannelOn(): RevealOutputChannelOn {
159159
const configuration = getUserConfiguration();
160-
if (!configuration) {
161-
return RevealOutputChannelOn.Error;
162-
}
163-
switch (configuration.revealOutputChannelOn) {
160+
const value = configuration ? configuration.revealOutputChannelOn : undefined;
161+
switch (value) {
164162
case 'info':
165163
return RevealOutputChannelOn.Info;
166164
case 'warn':
167165
return RevealOutputChannelOn.Warn;
168166
case 'error':
169167
return RevealOutputChannelOn.Error;
170168
case 'never':
169+
return RevealOutputChannelOn.Never;
171170
default:
172171
return RevealOutputChannelOn.Error;
173172
}

0 commit comments

Comments
 (0)