Skip to content

Commit cf131f5

Browse files
make this into a try catch (#5245)
1 parent a6fe43d commit cf131f5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/log.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,8 @@ if ($IsLinux) {
147147
sudo apt-get install -y lttng-tools
148148
sudo apt-get install -y liblttng-ust-dev
149149
}
150-
perf version 2>&1 | Out-Null
151-
if (!$?) {
150+
try { perf version | Out-Null }
151+
catch {
152152
Write-Debug "Installing perf"
153153
sudo apt-get install -y linux-tools-$(uname -r)
154154
sudo wget https://raw.githubusercontent.com/brendangregg/FlameGraph/master/stackcollapse-perf.pl -O /usr/bin/stackcollapse-perf.pl

0 commit comments

Comments
 (0)