1
- import which from 'which' ;
2
- import execa from 'execa' ;
1
+ import { isObject } from '@metamask/utils' ;
3
2
import createDebug from 'debug' ;
3
+ import execa from 'execa' ;
4
4
import { ErrorWithCause } from 'pony-cause' ;
5
- import { isObject } from '@metamask/utils ' ;
5
+ import which from 'which ' ;
6
6
7
7
export { isTruthyString } from '@metamask/action-utils' ;
8
8
export { hasProperty , isNullOrUndefined } from '@metamask/utils' ;
@@ -91,6 +91,7 @@ export function wrapError(message: string, originalError: unknown) {
91
91
return error ;
92
92
}
93
93
94
+ // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
94
95
return new Error ( `${ message } : ${ originalError } ` ) ;
95
96
}
96
97
@@ -130,7 +131,7 @@ export async function resolveExecutable(
130
131
export async function runCommand (
131
132
command : string ,
132
133
args ?: readonly string [ ] | undefined ,
133
- options ?: execa . Options < string > | undefined ,
134
+ options ?: execa . Options | undefined ,
134
135
) : Promise < void > {
135
136
await execa ( command , args , options ) ;
136
137
}
@@ -149,7 +150,7 @@ export async function runCommand(
149
150
export async function getStdoutFromCommand (
150
151
command : string ,
151
152
args ?: readonly string [ ] | undefined ,
152
- options ?: execa . Options < string > | undefined ,
153
+ options ?: execa . Options | undefined ,
153
154
) : Promise < string > {
154
155
return ( await execa ( command , args , options ) ) . stdout . trim ( ) ;
155
156
}
@@ -167,7 +168,7 @@ export async function getStdoutFromCommand(
167
168
export async function getLinesFromCommand (
168
169
command : string ,
169
170
args ?: readonly string [ ] | undefined ,
170
- options ?: execa . Options < string > | undefined ,
171
+ options ?: execa . Options | undefined ,
171
172
) : Promise < string [ ] > {
172
173
const { stdout } = await execa ( command , args , options ) ;
173
174
return stdout . split ( '\n' ) . filter ( ( value ) => value !== '' ) ;
0 commit comments