From a4e99b8a34d84c076dce9a86f26224c62323b13b Mon Sep 17 00:00:00 2001 From: Andre Arko Date: Mon, 24 Feb 2020 23:18:58 -0800 Subject: [PATCH] hide the inevitable SystemProfiler warning for some reason, this line shows up on stderr anytime I (or the find-device-port script) run `system_profiler SPUSBDataType` 2020-02-24 23:19:14.656 system_profiler[23932:4118769] SPUSBDevice: IOCreatePlugInInterfaceForService failed 0xe00002be I got annoyed enough to suppress it, so I could see the other output that I actually care about. --- bin/find-device-port-macos | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/find-device-port-macos b/bin/find-device-port-macos index 31ac15ec..ed799355 100644 --- a/bin/find-device-port-macos +++ b/bin/find-device-port-macos @@ -12,7 +12,7 @@ my $pid = shift @ARGV; # ioreg might be more machine-readable than system_profiler, but I haven't been able to # get it to produce useful output -my @output = qx(/usr/sbin/system_profiler SPUSBDataType); +my @output = qx(/usr/sbin/system_profiler SPUSBDataType 2> /dev/null); my $serial = ""; my $location = "";