mirror of
https://github.com/podman-desktop/podman-desktop
synced 2026-05-24 10:18:53 +00:00
fix: reset initialize and start mode after starting provider (#7115)
Signed-off-by: lstocchi <lstocchi@redhat.com>
This commit is contained in:
parent
fff043eaff
commit
2bfcbc1e8c
1 changed files with 9 additions and 2 deletions
|
|
@ -8,7 +8,12 @@ import ErrorMessage from '../ui/ErrorMessage.svelte';
|
|||
import Steps from '../ui/Steps.svelte';
|
||||
import PreflightChecks from './PreflightChecks.svelte';
|
||||
import ProviderCard from './ProviderCard.svelte';
|
||||
import { type InitializationContext, InitializationSteps, InitializeAndStartMode } from './ProviderInitUtils';
|
||||
import {
|
||||
type InitializationContext,
|
||||
InitializationSteps,
|
||||
InitializeAndStartMode,
|
||||
InitializeOnlyMode,
|
||||
} from './ProviderInitUtils';
|
||||
import ProviderUpdateButton from './ProviderUpdateButton.svelte';
|
||||
|
||||
export let provider: ProviderInfo;
|
||||
|
|
@ -24,7 +29,6 @@ let preflightChecks: CheckStatus[] = [];
|
|||
async function runProvider() {
|
||||
runError = undefined;
|
||||
runInProgress = true;
|
||||
runAtStart = false;
|
||||
try {
|
||||
await window.startProvider(provider.internalId);
|
||||
await new Promise<void>(resolve => {
|
||||
|
|
@ -41,6 +45,9 @@ async function runProvider() {
|
|||
|
||||
onMount(() => {
|
||||
if (runAtStart) {
|
||||
// we reset the mode bc the provider has to be started only after the initialization.
|
||||
// Otherwise if the user stops the provider, this component will mount again and will start the provider everytime
|
||||
initializationContext.mode = InitializeOnlyMode;
|
||||
runProvider();
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue