Skip to content

Commit c8c673f

Browse files
committed
Use Test-CommandAvailable for protoc and node
1 parent 11a2e31 commit c8c673f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

build.helpers.psm1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ function Install-Rust {
393393
param()
394394

395395
process {
396-
if ((Test-CommandAvailable -Name 'cargo')) {
396+
if (Test-CommandAvailable -Name 'cargo') {
397397
Write-Verbose "Rust already installed"
398398
return
399399
}
@@ -597,7 +597,7 @@ function Install-NodeJS {
597597
param()
598598

599599
process {
600-
if ((Get-Command 'node' -ErrorAction Ignore)) {
600+
if (Test-CommandAvailable -Name 'node') {
601601
Write-Verbose "Node.js already installed."
602602
return
603603
}
@@ -636,7 +636,7 @@ function Install-Protobuf {
636636
param()
637637

638638
process {
639-
if ((Get-Command 'protoc' -ErrorAction Ignore)) {
639+
if (Test-CommandAvailable -Name 'protoc') {
640640
Write-Verbose "Protobuf already installed."
641641
return
642642
}

0 commit comments

Comments
 (0)