Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't crash if trying to move directories for a target that failed
Previously, if there was a build with - a non-default target - that failed to build docs.rs would crash: ``` [DEBUG] cratesfyi::docbuilder::rustwide_builder: rename /home/cratesfyi/workspace/builds/stm32h7xx-hal-0.7.0/target/thumbv7em-none-eabihf/doc to /home/cratesfyi/workspace/builds/stm32h7xx-hal-0.7.0/target/doc 2020/09/03 20:15:49 [ERROR] cratesfyi::build_queue: Failed to build package stm32h7xx-hal-0.7.0 from queue: No such file or directory (os error 2) Backtrace: 0: failure::backtrace::internal::InternalBacktrace::new 1: <failure::backtrace::Backtrace as core::default::Default>::default 2: cratesfyi::docbuilder::rustwide_builder::RustwideBuilder::execute_build 3: rustwide::build::BuildBuilder::run 4: cratesfyi::docbuilder::rustwide_builder::RustwideBuilder::build_package 5: cratesfyi::build_queue::BuildQueue::process_next_crate 6: <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once 7: cratesfyi::utils::queue_builder::queue_builder 8: std::sys_common::backtrace::__rust_begin_short_backtrace 9: core::ops::function::FnOnce::call_once{{vtable.shim}} 10: <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once at /rustc/d3fb005a39e62501b8b0b356166e515ae24e2e54/src/liballoc/boxed.rs:1076 <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once at /rustc/d3fb005a39e62501b8b0b356166e515ae24e2e54/src/liballoc/boxed.rs:1076 std::sys::unix::thread::Thread::new::thread_start at /rustc/d3fb005a39e62501b8b0b356166e515ae24e2e54/src/libstd/sys/unix/thread.rs:87 11: start_thread 12: __clone ``` The issue is it was trying to rename a directory that didn't exist, because the build failed. This no longer tries to rename the directory unless the build succeeded.
- Loading branch information