UNPKG
@porosys/ndtool
Version:
latest (0.0.51)
0.0.51
0.0.50
0.0.49
0.0.48
0.0.47
0.0.46
0.0.45
0.0.44
0.0.43
0.0.42
0.0.41
0.0.40
0.0.39
0.0.38
0.0.37
0.0.36
0.0.35
0.0.34
0.0.33
0.0.32
0.0.31
0.0.30
Netdata alert and automation tool
@porosys/ndtool
/
lib
/
utils
/
is-binary-installed.util.ts
11 lines
(9 loc)
•
209 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
10
11
import
{ execa }
from
'execa'
;
export
const
isBinaryInstalled =
async
(
binary
:
string
):
Promise
<
boolean
> => {
try
{
await
execa
(
'which'
, [binary]);
return
true
; }
catch
{
return
false
; } };