Fix scanning on Linux#5
Conversation
| getLinuxSystemEdids() { | ||
| // /sys/devices/pci0000\:00/0000\:00\:02.0/drm/card0/card0-HDMI-A-1/edid | ||
| return glob('/sys/devices/pci*/0000:*/drm/card*/card*/edid') | ||
| return glob('/sys/devices/pci*/0000:*/*/drm/card*/card*/edid') |
There was a problem hiding this comment.
For local usage I added changes you've added to fix the error, however this line causes glob to not match any files, not sure if you added it for a reason, but I removed it and only then it matched the files needed
There was a problem hiding this comment.
Maybe it's depending on the OS ?
@leMaik on which OS did you try this ?
The ** pattern can help in this case, to cover both possibilities.
There was a problem hiding this comment.
Changing this made it work on Ubuntu for me back then so… 🤷♂️ Maybe …/0000:**/drm/card… would work for both of us?
| getLinuxSystemEdids() { | ||
| // /sys/devices/pci0000\:00/0000\:00\:02.0/drm/card0/card0-HDMI-A-1/edid | ||
| return glob('/sys/devices/pci*/0000:*/drm/card*/card*/edid') | ||
| return glob('/sys/devices/pci*/0000:*/*/drm/card*/card*/edid') |
There was a problem hiding this comment.
Maybe it's depending on the OS ?
@leMaik on which OS did you try this ?
The ** pattern can help in this case, to cover both possibilities.
This PR fixes scanning not working on Linux (fixes #4), removes debug output and changes the json
requirecalls to not use__dirname.requireis always relative to the script's directory, so this isn't needed.Background: I use this in an application that is bundled to an executable with pkg, which doesn't work for dynamic
requirecalls.PS: If someone needs this right now:
npm i -S @wertarbyte/edid-reader