import { access } from 'fs' ; import * as promisify from 'util.promisify' ; import * as vscode from 'vscode' ; import { findConfigFile , getOpenEdgeConfig } from './ablConfig' ; import { getBinPath } from './shared/ablPath' ; const accessAsync = promisify ( access ) ; export async function checkOpenEdgeConfigFile ( ) { const oeConfig = await findConfigFile ( ) ; if ( ! oeConfig ) { throw new Error ( '.openedge.json file is missing using default value' ) ; } } export async function checkProgressBinary ( ) { const oeConfig = await getOpenEdgeConfig ( ) ; let cmd = getBinPath ( '_progres.exe' , oeConfig . dlc ) ; try { await accessAsync ( cmd ) ; } catch ( e ) { cmd = getBinPath ( '_progres' , oeConfig . dlc ) ; await accessAsync ( cmd ) ; } }