@@ -22,6 +22,7 @@ import DescribeViewLoader from '../webview/describe/describeViewLoader';
2222import LogViewLoader from '../webview/log/LogViewLoader' ;
2323import { OpenShiftTerminalApi , OpenShiftTerminalManager } from '../webview/openshift-terminal/openShiftTerminal' ;
2424import OpenShiftItem , { clusterRequired } from './openshiftItem' ;
25+ import { which } from 'shelljs' ;
2526
2627function createCancelledResult ( stepName : string ) : any {
2728 const cancelledResult : any = new String ( '' ) ;
@@ -208,12 +209,23 @@ export class Component extends OpenShiftItem {
208209 if ( await Component . odo . isPodmanPresent ( ) ) {
209210 return Component . devRunOn ( component , 'podman' ) ;
210211 }
211- void window . showErrorMessage ( 'Podman is not present in the system, please install podman on your machine and try again.' , 'Install podman' )
212- . then ( async ( result ) => {
213- if ( result === 'Install podman' ) {
214- await commands . executeCommand ( 'vscode.open' , Uri . parse ( 'https://podman.io/' ) ) ;
215- }
216- } ) ;
212+ const podmanOnPath = which ( 'podman' ) ;
213+ if ( podmanOnPath ) {
214+ const SETUP_INSTRUCTIONS = 'Open setup instructions' ;
215+ void window . showErrorMessage ( 'Podman is present on the system, but is not fully set up yet.' , SETUP_INSTRUCTIONS )
216+ . then ( result => {
217+ if ( result === SETUP_INSTRUCTIONS ) {
218+ void commands . executeCommand ( 'vscode.open' , Uri . parse ( 'https://podman.io/docs/installation' ) ) ;
219+ }
220+ } ) ;
221+ } else {
222+ void window . showErrorMessage ( 'Podman is not present in the system, please install podman on your machine and try again.' , 'Install podman' )
223+ . then ( async ( result ) => {
224+ if ( result === 'Install podman' ) {
225+ await commands . executeCommand ( 'vscode.open' , Uri . parse ( 'https://podman.io/' ) ) ;
226+ }
227+ } ) ;
228+ }
217229 return ;
218230 }
219231
0 commit comments