Skip to content

Commit 6868205

Browse files
committed
Fix install script
1 parent beb20f3 commit 6868205

1 file changed

Lines changed: 12 additions & 10 deletions

File tree

bin/install

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ print_usage() {
2727
echo " then copy the resulting main manifest back to *.toml.default."
2828
echo " --skip-subprojects Skip setup/update of examples, test, and docs sub-projects."
2929
echo " --no-precompile Skip all Pkg.precompile() steps; just resolve manifests."
30-
echo " +X.Y, --version X.Y Use Julia channel X.Y for this invocation (no juliaup default change)."
30+
echo " +X.Y, --version X.Y Use Julia channel X.Y and set it as the juliaup default."
3131
echo " Without this, a menu will ask you to choose 1.11 or 1.12"
3232
echo " (with the currently active Julia version as default)."
3333
echo " -h, --help Show this help message and exit."
@@ -142,13 +142,15 @@ else
142142
_current_major="${_current_julia%.*}"
143143
fi
144144

145-
echo "Ensuring Julia ${_desired_julia} channel is installed (without changing juliaup default)..."
145+
echo "Ensuring Julia ${_desired_julia} channel is installed..."
146146
juliaup add "${_desired_julia}"
147+
echo "Setting Julia ${_desired_julia} as the juliaup default..."
148+
juliaup default "${_desired_julia}"
147149
echo
148150

149151
julia_major="${_desired_julia}"
150152
JULIA="julia +${_desired_julia}"
151-
echo "Using ${JULIA} for this run."
153+
echo "Using ${JULIA} for this run (now also the juliaup default)."
152154

153155
export JULIA_PKG_SERVER_REGISTRY_PREFERENCE=eager
154156

@@ -183,8 +185,9 @@ fi
183185
_prepare_manifests() {
184186
local dir="${1:-.}"
185187
rm -f "${dir}/Manifest.toml"
186-
[ -f "${dir}/Manifest-v1.11.toml" ] || touch "${dir}/Manifest-v1.11.toml"
187-
[ -f "${dir}/Manifest-v1.12.toml" ] || touch "${dir}/Manifest-v1.12.toml"
188+
# Remove stale 0-byte versioned manifests left from failed previous runs
189+
[ -s "${dir}/Manifest-v1.11.toml" ] || rm -f "${dir}/Manifest-v1.11.toml"
190+
[ -s "${dir}/Manifest-v1.12.toml" ] || rm -f "${dir}/Manifest-v1.12.toml"
188191
}
189192

190193
if [[ $_update == true ]]; then
@@ -250,12 +253,11 @@ else
250253
echo "Precompiling $_sub project..."
251254
$JULIA --project="$_sub" -e 'using Pkg; Pkg.precompile()'
252255
fi
256+
if [[ $julia_major == "1.12" ]]; then
257+
rm -f examples/Manifest*.toml test/Manifest*.toml docs/Manifest*.toml
258+
echo "Removed subproject manifests for Julia 1.12"
259+
fi
253260
done
254-
255-
if [[ $julia_major == "1.12" ]]; then
256-
rm -f examples/Manifest*.toml test/Manifest*.toml docs/Manifest*.toml
257-
echo "Removed subproject manifests for Julia 1.12"
258-
fi
259261
fi
260262

261263
# Copy .JETLSConfig.toml.default to .JETLSConfig.toml if it doesn't exist

0 commit comments

Comments
 (0)