@@ -3,11 +3,11 @@ function installFromCargoBuildLog() (
33 local log=${2:- ${cargoBuildLog:? not defined} }
44
55 if ! [ -f " ${log} " ]; then
6- echo unable to install, cargo build log does not exist at: ${log}
6+ echo " unable to install, cargo build log does not exist at: ${log} "
77 false
88 fi
99
10- echo searching for bins/libs to install from cargo build log at ${log}
10+ echo " searching for bins/libs to install from cargo build log at ${log} "
1111
1212 local logs
1313 logs=$( @jq@ -R ' fromjson?' < " ${log} " )
@@ -19,7 +19,9 @@ function installFromCargoBuildLog() (
1919 local select_non_deps_artifact=' select(contains("/deps/artifact/") | not)'
2020
2121 # Only install binaries and libraries from the current workspace as a sanity check
22- local members=" $( command cargo metadata --format-version 1 | @jq@ -c ' .workspace_members' ) "
22+ local members
23+ members=" $( command cargo metadata --format-version 1 | @jq@ -c ' .workspace_members' ) "
24+ # shellcheck disable=SC2016
2325 local select_non_test_members=' select(.reason == "compiler-artifact" and .profile.test == false)
2426 | select(.package_id as $pid
2527 | ' " ${members} " '
@@ -42,7 +44,7 @@ function installFromCargoBuildLog() (
4244 mkdir -p " ${loc} "
4345
4446 while IFS= read -r to_install; do
45- echo installing ${to_install} in " ${loc} "
47+ echo " installing ${to_install} in ${loc} "
4648 cp " ${to_install} " " ${loc} "
4749 done
4850
@@ -59,7 +61,7 @@ function installFromCargoBuildLog() (
5961# we are planning to install (see https://github.com/ipetkov/crane/issues/765). To work around
6062# this we'll capture any installables immediately after running and actually install them later
6163function postBuildInstallFromCargoBuildLog() (
62- if [ -n " ${cargoBuildLog:- } " -a -f " ${cargoBuildLog} " ]; then
64+ if [ -n " ${cargoBuildLog:- } " ] && [ -f " ${cargoBuildLog} " ]; then
6365 installFromCargoBuildLog " ${postBuildInstallFromCargoBuildLogOut} " " ${cargoBuildLog} "
6466 else
6567 cat << -'EOF '
0 commit comments