@@ -355,9 +355,20 @@ function _process_project_env(;
355355 packagebundler_toml =
356356 isfile(packagebundler_file) ? TOML. parsefile(packagebundler_file) :
357357 Dict{String,Any}()
358+ packagebundler_toml_juliaup = get(Dict{String,Any}, packagebundler_toml, " juliaup" )
358359 julia_version = TOML. parsefile(manifest_toml)[" julia_version" ]
359360 julia_version =
360- get(get(Dict{String,Any}, packagebundler_toml, " juliaup" ), " channel" , julia_version)
361+ get(packagebundler_toml_juliaup, " channel" , julia_version)
362+ if haskey(packagebundler_toml_juliaup, " channel" )
363+ packagebundler_toml = merge(packagebundler_toml, Dict(
364+ " juliaup" => Dict(
365+ " channel" => _juliaup_channel(packagebundler_toml_juliaup[" channel" ])
366+ )
367+ ))
368+ open(joinpath(named_environment, " PackageBundler.toml" ), " w" ) do io
369+ TOML. print(io, packagebundler_toml)
370+ end
371+ end
361372
362373 pkg_version_info = Dict()
363374 for (each_uuid, each_name) in stripped
@@ -749,7 +760,7 @@ function _process_multiplexers(
749760 exists = Sys. which(multiplexer)
750761 if ! isnothing(exists)
751762 if multiplexer == " juliaup"
752- return ` julia +$(julia_version) `
763+ return ` julia +$(_juliaup_channel( julia_version) ) `
753764 elseif multiplexer == " asdf"
754765 return withenv(" ASDF_JULIA_VERSION" => " $(julia_version) " ) do
755766 path = readchomp(` asdf which julia` )
@@ -771,3 +782,11 @@ function _process_multiplexers(
771782 error(" no multiplexers found: $(repr(multiplexers)) " )
772783 end
773784end
785+
786+ function _juliaup_channel(julia_version:: Union{String,VersionNumber} )
787+ if Sys. ARCH != Symbol(readchomp(` uname -m` ))
788+ arch = if Sys. ARCH == :i686; :x86; elseif Sys. ARCH == :x86_64; :x64; else Sys. ARCH; end
789+ return " $(julia_version) ~$arch "
790+ end
791+ return julia_version
792+ end
0 commit comments