66import * as proc from 'child_process'
77import { pushIf } from '../../utilities/collectionUtils'
88import * as nls from 'vscode-nls'
9- import { fileExists } from '../../filesystemUtilities'
109import { getLogger , getDebugConsoleLogger , Logger } from '../../logger'
1110import { ChildProcess } from '../../utilities/processUtils'
1211import { Timeout } from '../../utilities/timeoutUtils'
@@ -15,6 +14,7 @@ import * as vscode from 'vscode'
1514import globals from '../../extensionGlobals'
1615import { SamCliSettings } from './samCliSettings'
1716import { addTelemetryEnvVar , collectSamErrors , SamCliError } from './samCliInvokerUtils'
17+ import { fs } from '../..'
1818
1919const localize = nls . loadMessageBundle ( )
2020
@@ -236,6 +236,8 @@ export class SamCliLocalInvokeInvocation {
236236 const sam = await this . config . getOrDetectSamCli ( )
237237 // eslint-disable-next-line aws-toolkits/no-console-log
238238 console . log ( 'getOrDetect took %O seconds' , ( Date . now ( ) - start ) / 1000 )
239+ // eslint-disable-next-line aws-toolkits/no-console-log
240+ console . log ( 'autodetect is %O' , sam . autoDetected )
239241 if ( ! sam . path ) {
240242 getLogger ( ) . warn ( 'SAM CLI not found and not configured' )
241243 } else if ( sam . autoDetected ) {
@@ -290,11 +292,11 @@ export class SamCliLocalInvokeInvocation {
290292 throw new Error ( 'template resource name is missing or empty' )
291293 }
292294
293- if ( ! ( await fileExists ( this . args . templatePath ) ) ) {
295+ if ( ! ( await fs . exists ( this . args . templatePath ) ) ) {
294296 throw new Error ( `template path does not exist: ${ this . args . templatePath } ` )
295297 }
296298
297- if ( this . args . eventPath !== undefined && ! ( await fileExists ( this . args . eventPath ) ) ) {
299+ if ( this . args . eventPath !== undefined && ! ( await fs . exists ( this . args . eventPath ) ) ) {
298300 throw new Error ( `event path does not exist: ${ this . args . eventPath } ` )
299301 }
300302 }
0 commit comments