Skip to content

Commit

Permalink
fix: bugs with mise/macos
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Nov 12, 2024
1 parent 0223d25 commit 8bc8c84
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions lib/util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,11 @@ function fetchVersions()
return versionList
end

local ClangVersions = fetchVersions()

-- available.lua
function fetchAvailable()
local result = {}

for i, v in ipairs(ClangVersions) do
for i, v in ipairs(fetchVersions()) do
if i == 1 then
table.insert(result, {
version = v,
Expand All @@ -50,6 +48,7 @@ end
-- pre_install.lua
function getDownloadInfo(version)
local file
local ClangVersions = fetchVersions()

if version == "latest" then
version = ClangVersions[1]
Expand Down Expand Up @@ -86,7 +85,7 @@ function generatePixi(osType, archType)
print("Unsupported architecture: " .. archType)
os.exit(1)
end
if osType == "macos" then
if osType == "darwin" then
file = "pixi-" .. archType .. "-apple-darwin.tar.gz"
elseif osType == "linux" then
file = "pixi-" .. archType .. "-unknown-linux-musl.tar.gz"
Expand All @@ -106,9 +105,8 @@ function pixiInstall(path, version)
local condaForge = os.getenv("Conda_Forge") or "conda-forge"
local noStdout = RUNTIME.osType == "windows" and " > nul" or " > /dev/null"
local pixi = RUNTIME.osType == "windows" and path .. "\\pixi.exe" or path .. "/pixi"
local command = pixi .. " global install -qc " .. condaForge .. " clang=" .. version
local command = "PIXI_HOME=" .. path .. " " .. pixi .. " global install -qc " .. condaForge .. " clang=" .. version

os.setenv("PIXI_HOME", path)
local status = os.execute(command .. noStdout)
if status ~= 0 then
print("Failed to execute command: " .. command)
Expand Down

0 comments on commit 8bc8c84

Please sign in to comment.