cargo.eclass: fix quoting/arg handling
authorMike Frysinger <vapier@chromium.org>
Tue, 16 May 2017 19:07:11 +0000 (15:07 -0400)
committerMike Frysinger <vapier@gentoo.org>
Tue, 16 May 2017 19:10:32 +0000 (15:10 -0400)
eclass/cargo.eclass

index 32d04a2d559bf9a3f2514b8884935f9df09b0259..b08aa9e28aae6617b06c255aca63af33fb00eb1d 100644 (file)
@@ -29,12 +29,13 @@ ECARGO_VENDOR="${ECARGO_HOME}/gentoo"
 # @DESCRIPTION:
 # Generates the URIs to put in SRC_URI to help fetch dependencies.
 cargo_crate_uris() {
-       for crate in $*; do
+       local crate
+       for crate in "$@"; do
                local name version url
                name="${crate%-*}"
                version="${crate##*-}"
                url="https://crates.io/api/v1/crates/${name}/${version}/download -> ${crate}.crate"
-               echo $url
+               echo "${url}"
        done
 }
 
@@ -93,7 +94,7 @@ cargo_src_unpack() {
 cargo_gen_config() {
        debug-print-function ${FUNCNAME} "$@"
 
-       cat <<- EOF > ${ECARGO_HOME}/config
+       cat <<- EOF > "${ECARGO_HOME}/config"
        [source.gentoo]
        directory = "${ECARGO_VENDOR}"