Skip to content

Commit 0fc598a

Browse files
committed
Updated dartsass script to include aarch64-linux variant
1 parent 83ef657 commit 0fc598a

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

exe/dartsass

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,18 @@
33

44
require "shellwords"
55

6-
os = Gem::Platform.local.os
6+
platform_info = Gem::Platform.local
7+
platform_string = "#{platform_info.cpu}-#{platform_info.os}"
78

89
exe_path =
9-
case os
10-
when "darwin" then File.join(__dir__, "darwin/sass")
11-
when "linux" then File.join(__dir__, "linux/sass")
12-
when "mingw32" then File.join(__dir__, "mingw32/sass.bat")
10+
case platform_string
11+
when "aarch64-linux" then File.join(__dir__, "aarch64-linux/sass")
12+
when /darwin\z/ then File.join(__dir__, "darwin/sass")
13+
when /linux\z/ then File.join(__dir__, "linux/sass")
14+
when /mingw32\z/ then File.join(__dir__, "mingw32/sass.bat")
1315
else
1416
STDERR.puts(<<~ERRMSG)
15-
ERROR: dartsass-rails does not support the #{os} operating system
17+
ERROR: dartsass-rails does not support the #{platform_string} platform
1618
ERRMSG
1719
exit 1
1820
end

0 commit comments

Comments
 (0)