git.iko.soy/typeable/nixpkgs
on master help sign in
buildRustCrate: fix equality testing

Use string equality instead of integer equality.

commit8cc6897ae9fc80e0c3933ff13f15c2f240c00c6e authorShell Turner <cam.turn@gmail.com> dateTue 27 Mar 2018, 20:08 (9 years ago) parentdddf031
1 file changed+4−4
pkgs/build-support/rust/build-rust-crate.nix+4−4
pkgs/build-support/rust/build-rust-crate.nix+4−4
@@ -19,7 +19,7 @@ let makeDeps = dependencies:
1919 echo_build_heading() {
2020 start=""
2121 end=""
22− if [[ x"${colors}" -eq x"always" ]]; then
22+ if [[ x"${colors}" = x"always" ]]; then
2323 start="$(printf '\033[0;1;32m')" #set bold, and set green.
2424 end="$(printf '\033[0m')" #returns to "normal"
2525 fi
@@ -34,7 +34,7 @@ let makeDeps = dependencies:
3434 noisily() {
3535 start=""
3636 end=""
37− if [[ x"${colors}" -eq x"always" ]]; then
37+ if [[ x"${colors}" = x"always" ]]; then
3838 start="$(printf '\033[0;1;32m')" #set bold, and set green.
3939 end="$(printf '\033[0m')" #returns to "normal"
4040 fi
@@ -194,7 +194,7 @@ let makeDeps = dependencies:
194194 bold=""
195195 green=""
196196 boldgreen=""
197− if [[ "${colors}" -eq "always" ]]; then
197+ if [[ "${colors}" = "always" ]]; then
198198 norm="$(printf '\033[0m')" #returns to "normal"
199199 bold="$(printf '\033[0;1m')" #set bold
200200 green="$(printf '\033[0;32m')" #set green
@@ -230,7 +230,7 @@ let makeDeps = dependencies:
230230 ${crateFeatures} --out-dir target/bin --emit=dep-info,link -L dependency=target/deps \
231231 $LINK ${deps}$EXTRA_LIB --cap-lints allow \
232232 $BUILD_OUT_DIR $EXTRA_BUILD $EXTRA_FEATURES --color ${colors}
233− if [ "$crate_name_" -ne "$crate_name" ]; then
233+ if [ "$crate_name_" != "$crate_name" ]; then
234234 mv target/bin/$crate_name_ target/bin/$crate_name
235235 fi
236236 }