Skip to content

Commit 9869ca6

Browse files
committed
refactor: clean up GetDownloadInfo function in util.lua
1 parent 59c6f1e commit 9869ca6

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

lib/util.lua

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,14 @@ end
2626

2727
function util:GetDownloadInfo(version)
2828
local os_type = RUNTIME.osType
29-
os_type = "linux"
30-
-- if os_type ~= "Linux" then
31-
-- return nil, "Unsupported OS type: " .. os_type
32-
-- end
29+
if os_type ~= "Linux" then
30+
return nil, "Unsupported OS type: " .. os_type
31+
end
3332

3433
local arch = RUNTIME.archType
3534
if arch == "x86_64" then
3635
arch = "amd64"
3736
end
38-
arch = "amd64"
3937
local file_name = string.format("chaosblade-%s-%s-%s.tar.gz", version, os_type, arch)
4038
local url = string.format("https://github.com/chaosblade-io/chaosblade/releases/download/v%s/%s", version, file_name)
4139

0 commit comments

Comments
 (0)