]> git.lizzy.rs Git - rust.git/commitdiff
install: Error on uninstall if manifest can't be found
authorBrian Anderson <banderson@mozilla.com>
Sat, 22 Mar 2014 00:31:18 +0000 (17:31 -0700)
committerBrian Anderson <banderson@mozilla.com>
Mon, 24 Mar 2014 21:29:18 +0000 (14:29 -0700)
src/etc/install.sh

index 19e61251dc20befb79dd2d7e933cd9ed569e44f6..5b41e25e2577465565a742a62d7d220287026332 100644 (file)
@@ -237,6 +237,7 @@ need_ok "failed to remove install probe"
 "${CFG_SRC_DIR}/bin/rustc" --version > /dev/null
 need_ok "can't run these binaries on this platform"
 
+
 # First, uninstall from the installation prefix
 # FIXME: Hardcoded 'rustlib' ignores CFG_RUSTLIBDIR
 if [ -f "${CFG_PREFIX}/lib/rustlib/manifest" ]
@@ -251,6 +252,12 @@ then
     msg "uninstall ${CFG_PREFIX}/lib/rustlib"
     rm -r "${CFG_PREFIX}/lib/rustlib"
     need_ok "failed to remove rustlib"
+else
+    if [ -n "${CFG_UNINSTALL}" ]
+    then
+        err "unable to find manifest at ${CFG_PREFIX}/lib/rustlib"
+        exit 0
+    fi
 fi
 
 # If we're only uninstalling then exit