Skip to content

Commit

Permalink
add 'configured' state
Browse files Browse the repository at this point in the history
Signed-off-by: Yevhen Vydolob <[email protected]>
  • Loading branch information
evidolob committed May 2, 2023
1 parent 674d55a commit b3bb6b3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/crc-status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ export class CrcStatus {
case 'Stopping':
return 'stopping';
case 'Stopped':
return 'stopped';
return 'configured';
case 'No Cluster':
return 'stopped';
return 'configured';
case 'Error':
return 'error';
case 'Need Setup':
Expand Down
3 changes: 2 additions & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ export async function activate(extensionContext: extensionApi.ExtensionContext):
if (hasSetupFinished) {
await needSetup();
connectToCrc();
presetChanged(provider, extensionContext);
}
},
}),
Expand Down Expand Up @@ -198,7 +199,7 @@ async function registerOpenShiftLocalCluster(
async function readPreset(crcStatus: Status): Promise<'Podman' | 'OpenShift' | 'MicroShift' | 'unknown'> {
let preset: string;
//preset could be undefined if vm not created yet, use preferences instead
if (crcStatus.Preset === undefined) {
if (crcStatus.Preset === undefined || crcStatus.Preset === 'Unknown') {
const config = await commander.configGet();
preset = config.preset;
} else {
Expand Down

0 comments on commit b3bb6b3

Please sign in to comment.