Skip to content

Commit

Permalink
fix(chip.cr): glob doesn't work in all cases
Browse files Browse the repository at this point in the history
found issues within docker images for some reason
  • Loading branch information
stakach committed May 13, 2024
1 parent 772fa9e commit 5cc878e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion shard.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: gpio
version: 1.1.0
version: 1.1.1

authors:
- Stephen von Takach <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion src/gpio/chip.cr
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class GPIO::Chip
def self.all
Dir.glob("/dev/gpiochip*").sort!.map { |path| new(Path[path]) }
Dir.entries("/dev/").select(&.starts_with?("gpio")).sort!.map { |path| new(Path.new("/dev", path)) }
end

def initialize(path : Path)
Expand Down

0 comments on commit 5cc878e

Please sign in to comment.