Skip to content

Commit dcf5f11

Browse files
authored
Merge pull request #69 from evidolob/fix-64
add 'configured' state
2 parents 674d55a + b3bb6b3 commit dcf5f11

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/crc-status.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,9 @@ export class CrcStatus {
123123
case 'Stopping':
124124
return 'stopping';
125125
case 'Stopped':
126-
return 'stopped';
126+
return 'configured';
127127
case 'No Cluster':
128-
return 'stopped';
128+
return 'configured';
129129
case 'Error':
130130
return 'error';
131131
case 'Need Setup':

src/extension.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ export async function activate(extensionContext: extensionApi.ExtensionContext):
9292
if (hasSetupFinished) {
9393
await needSetup();
9494
connectToCrc();
95+
presetChanged(provider, extensionContext);
9596
}
9697
},
9798
}),
@@ -198,7 +199,7 @@ async function registerOpenShiftLocalCluster(
198199
async function readPreset(crcStatus: Status): Promise<'Podman' | 'OpenShift' | 'MicroShift' | 'unknown'> {
199200
let preset: string;
200201
//preset could be undefined if vm not created yet, use preferences instead
201-
if (crcStatus.Preset === undefined) {
202+
if (crcStatus.Preset === undefined || crcStatus.Preset === 'Unknown') {
202203
const config = await commander.configGet();
203204
preset = config.preset;
204205
} else {

0 commit comments

Comments
 (0)