File tree Expand file tree Collapse file tree 3 files changed +21
-19
lines changed Expand file tree Collapse file tree 3 files changed +21
-19
lines changed Original file line number Diff line number Diff line change 37
37
"@oclif/plugin-update" : " ^1.3.8" ,
38
38
"@sentry/integrations" : " ^5.29.2" ,
39
39
"@sentry/node" : " ^5.29.2" ,
40
- "@types/command-exists" : " ^1.2.0" ,
41
40
"@types/cors" : " ^2.8.7" ,
42
41
"@types/node-fetch" : " ^2.5.4" ,
43
42
"@types/tmp" : " 0.0.33" ,
44
43
"async-mutex" : " ^0.1.3" ,
45
44
"chrome-remote-interface" : " ^0.28.0" ,
46
- "command-exists" : " ^1.2.8" ,
47
45
"cors" : " ^2.8.5" ,
48
46
"cors-gate" : " ^1.1.3" ,
49
47
"env-paths" : " ^1.0.0" ,
54
52
"graphql" : " ^14.7.0" ,
55
53
"iconv-lite" : " ^0.4.24" ,
56
54
"lodash" : " ^4.17.21" ,
55
+ "lookpath" : " ^1.2.1" ,
57
56
"mime-types" : " ^2.1.27" ,
58
57
"mockttp" : " ^1.2.1" ,
59
58
"node-fetch" : " ^2.6.1" ,
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import { promisify } from 'util';
2
2
import * as fs from 'fs' ;
3
3
import * as tmp from 'tmp' ;
4
4
import * as rimraf from 'rimraf' ;
5
- import * as ensureCommandExists from 'command-exists ' ;
5
+ import { lookpath } from 'lookpath ' ;
6
6
7
7
export function delay ( durationMs : number ) : Promise < void > {
8
8
return new Promise ( ( resolve ) => setTimeout ( resolve , durationMs ) ) ;
@@ -63,7 +63,7 @@ export const ensureDirectoryExists = (path: string) =>
63
63
checkAccess ( path ) . catch ( ( ) => mkDir ( path , { recursive : true } ) ) ;
64
64
65
65
export const commandExists = ( path : string ) : Promise < boolean > =>
66
- ensureCommandExists ( path ) . then ( ( ) => true ) . catch ( ( ) => false ) ;
66
+ lookpath ( path ) . then ( ( result ) => result !== undefined ) ;
67
67
68
68
export const createTmp = ( options : tmp . Options = { } ) => new Promise < {
69
69
path : string ,
You can’t perform that action at this time.
0 commit comments