Skip to content

Commit

Permalink
Merge pull request crc-org#69 from evidolob/fix-64
Browse files Browse the repository at this point in the history
add 'configured' state
  • Loading branch information
praveenkumar authored May 3, 2023
2 parents 674d55a + b3bb6b3 commit dcf5f11
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 dcf5f11

Please sign in to comment.