Skip to content

handle empty bus_num#17

Open
adzierzanowski wants to merge 2 commits intojlhonora:masterfrom
adzierzanowski:master
Open

handle empty bus_num#17
adzierzanowski wants to merge 2 commits intojlhonora:masterfrom
adzierzanowski:master

Conversation

@adzierzanowski
Copy link

When $bus_num is empty (e.g. in case of 05ac:8102 Apple Inc. Apple T2 Bus), the script throws the following error:

/usr/local/bin/lsusb: line 89: 16#: invalid integer constant (error token is "16#")

because it is not possible to treat an empty variable as a hexadecimal and convert it into an integer. My fix handles the situation by printing --- when the bus number is not provided.

@reitermarkus
Copy link

@jlhonora, can this be merged?

@robertlipe
Copy link

This is the same problem fixed - in a different way - in #18 also, so if you merge this one you can get a two-fer.
#18 was a confirmed fix for the version I installed via homebrew.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants