@@ -234,16 +234,16 @@ validate_opt
234
234
# Sanity check: can we run the binaries?
235
235
if [ -z " ${CFG_DISABLE_VERIFY} " ]
236
236
then
237
- # Don't do this if uninstalling. Failure here won't help in any way.
238
- if [ -z " ${CFG_UNINSTALL} " ]
239
- then
240
- msg " verifying platform can run binaries"
241
- " ${CFG_SRC_DIR} /bin/rustc" --version > /dev/null
242
- if [ $? -ne 0 ]
243
- then
244
- err " can't execute rustc binary on this platform"
245
- fi
246
- fi
237
+ # Don't do this if uninstalling. Failure here won't help in any way.
238
+ if [ -z " ${CFG_UNINSTALL} " ]
239
+ then
240
+ msg " verifying platform can run binaries"
241
+ " ${CFG_SRC_DIR} /bin/rustc" --version > /dev/null
242
+ if [ $? -ne 0 ]
243
+ then
244
+ err " can't execute rustc binary on this platform"
245
+ fi
246
+ fi
247
247
fi
248
248
249
249
# Sanity check: can we can write to the destination?
@@ -255,7 +255,7 @@ if [ $? -ne 0 ]
255
255
then
256
256
err " can't write to destination. consider \` sudo\` ."
257
257
fi
258
- rm " ${CFG_LIBDIR} /rust-install-probe"
258
+ rm -f " ${CFG_LIBDIR} /rust-install-probe"
259
259
need_ok " failed to remove install probe"
260
260
261
261
# Sanity check: don't install to the directory containing the installer.
281
281
msg " removing $p "
282
282
if [ -f " $p " ]
283
283
then
284
- rm " $p "
284
+ rm -f " $p "
285
285
if [ $? -ne 0 ]
286
286
then
287
287
warn " failed to remove $p "
@@ -291,12 +291,16 @@ then
291
291
fi
292
292
done < " ${INSTALLED_MANIFEST} "
293
293
294
- # TODO: Remove the manifest.
295
- # If we fail to remove rustlib below, then the installed manifest will
296
- # still be full; the installed manifest needs to be empty before install.
294
+ # If we fail to remove rustlib below, then the installed manifest will
295
+ # still be full; the installed manifest needs to be empty before install.
296
+ msg " removing ${CFG_LIBDIR} /rustlib/manifest"
297
+ rm -f " ${CFG_LIBDIR} /rustlib/manifest"
298
+ # For the above reason, this is a hard error
299
+ need_ok " failed to remove installed manifest"
297
300
298
301
# Remove 'rustlib' directory
299
- rm -r " ${CFG_LIBDIR} /rustlib"
302
+ msg " removing ${CFG_LIBDIR} /rustlib"
303
+ rm -Rf " ${CFG_LIBDIR} /rustlib"
300
304
if [ $? -ne 0 ]
301
305
then
302
306
warn " failed to remove rustlib"
0 commit comments