diff --git a/src/openshift/component.ts b/src/openshift/component.ts index 5c6f12146..96e824683 100644 --- a/src/openshift/component.ts +++ b/src/openshift/component.ts @@ -22,6 +22,7 @@ import DescribeViewLoader from '../webview/describe/describeViewLoader'; import LogViewLoader from '../webview/log/LogViewLoader'; import { OpenShiftTerminalApi, OpenShiftTerminalManager } from '../webview/openshift-terminal/openShiftTerminal'; import OpenShiftItem, { clusterRequired } from './openshiftItem'; +import { which } from 'shelljs'; function createCancelledResult(stepName: string): any { const cancelledResult: any = new String(''); @@ -208,12 +209,23 @@ export class Component extends OpenShiftItem { if (await Component.odo.isPodmanPresent()) { return Component.devRunOn(component, 'podman'); } - void window.showErrorMessage('Podman is not present in the system, please install podman on your machine and try again.', 'Install podman') - .then(async (result) => { - if (result === 'Install podman') { - await commands.executeCommand('vscode.open', Uri.parse('https://podman.io/')); - } - }); + const podmanOnPath = which('podman'); + if (podmanOnPath) { + const SETUP_INSTRUCTIONS = 'Open setup instructions'; + void window.showErrorMessage('Podman is present on the system, but is not fully set up yet.', SETUP_INSTRUCTIONS) + .then(result => { + if (result === SETUP_INSTRUCTIONS) { + void commands.executeCommand('vscode.open', Uri.parse('https://podman.io/docs/installation')); + } + }); + } else { + void window.showErrorMessage('Podman is not present in the system, please install podman on your machine and try again.', 'Install podman') + .then(async (result) => { + if (result === 'Install podman') { + await commands.executeCommand('vscode.open', Uri.parse('https://podman.io/')); + } + }); + } return; }