Skip to content

Commit

Permalink
Whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
brson committed Mar 8, 2016
1 parent 5213f44 commit 245179b
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 28 deletions.
46 changes: 23 additions & 23 deletions src/multirust
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ handle_command_line_args() {
list-toolchains
remove-override
remove-toolchain
list-available-toolchains
list-available-toolchains
run
upgrade-data
delete-data
Expand Down Expand Up @@ -562,22 +562,22 @@ handle_command_line_args() {
remove_toolchain "$2"
;;

list-available-targets)
if [ -z "${2-}" ]; then
err 'unspecified toolchain. try `multirust help list-available-targets`'
fi
list_available_targets "$2"
;;

add-target)
if [ -z "${2-}" ]; then
err 'unspecified toolchain. try `multirust help add-target`'
fi
if [ -z "${3-}" ]; then
err 'unspecified target. try `multirust help add-target`'
fi
add_target "$2" "$3"
;;
list-available-targets)
if [ -z "${2-}" ]; then
err 'unspecified toolchain. try `multirust help list-available-targets`'
fi
list_available_targets "$2"
;;

add-target)
if [ -z "${2-}" ]; then
err 'unspecified toolchain. try `multirust help add-target`'
fi
if [ -z "${3-}" ]; then
err 'unspecified target. try `multirust help add-target`'
fi
add_target "$2" "$3"
;;

run)
if [ -z "${2-}" ]; then
Expand Down Expand Up @@ -948,13 +948,13 @@ list_available_targets() {
local _dir="$RETVAL"

if [ ! -e "$_dir" ]; then
err "toolchain '$_toolchain' is not installed"
exit 1
err "toolchain '$_toolchain' is not installed"
exit 1
fi

call_rustup --prefix="$_dir" --list-available-targets
if [ $? != 0 ]; then
exit 1
exit 1
fi
}

Expand All @@ -966,13 +966,13 @@ add_target() {
local _dir="$RETVAL"

if [ ! -e "$_dir" ]; then
err "toolchain '$_toolchain' is not installed"
exit 1
err "toolchain '$_toolchain' is not installed"
exit 1
fi

call_rustup --prefix="$_dir" --add-target="$_target"
if [ $? != 0 ]; then
exit 1
exit 1
fi
}

Expand Down
10 changes: 5 additions & 5 deletions test-v2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ build_mock_cargo_installer() {

build_mock_std_installer() {
local _package="$1"

get_architecture
local _arch="$RETVAL"

Expand Down Expand Up @@ -525,7 +525,7 @@ build_mock_channel_manifest() {
printf "%s\n" "[pkg.rust.target.$_arch.extensions]]" >> "$_manifest"
printf "%s\n" "pkg = \"rust-std\"" >> "$_manifest"
printf "%s\n" "target = \"$CROSS_ARCH2\"" >> "$_manifest"

# the other packages
printf "%s\n" "[pkg.rustc]" >> "$_manifest"
printf "%s\n" "version = \"$_version\"" >> "$_manifest"
Expand Down Expand Up @@ -559,7 +559,7 @@ build_mock_channel() {
rm -Rf "$MOCK_BUILD_DIR"
mkdir -p "$MOCK_BUILD_DIR"

say "building mock channel $_version $_version_hash $_package $_channel $_date"
say "building mock channel $_version $_version_hash $_package $_channel $_date"
build_mock_std_installer "$_package"
build_mock_cross_std_installer "$_package" "$CROSS_ARCH1" "$_date"
build_mock_cross_std_installer "$_package" "$CROSS_ARCH2" "$_date"
Expand Down Expand Up @@ -611,7 +611,7 @@ frob_win_path() {
printf '%s' "$_path" | sed s~file:///c/~file://c:/~
;;
*)
printf '%s' "$_path"
printf '%s' "$_path"
;;
esac
}
Expand Down Expand Up @@ -1217,7 +1217,7 @@ ctl_default_toolchain_with_default_and_override() {
runtest ctl_default_toolchain_with_default_and_override

list_available_targets_no_toolchain() {
expect_output_fail "toolchain 'bogus' is not installed" multirust list-available-targets bogus
expect_output_fail "toolchain 'bogus' is not installed" multirust list-available-targets bogus
}
runtest list_available_targets_no_toolchain

Expand Down

0 comments on commit 245179b

Please sign in to comment.