Do not remove the pkg directory

A recent commit ensured that the pkg directory was removed as the first step of creating it. Unfortunately, this causes a problem for tools such as webpack when watching the pkg directory. In the case of webpack, it is unable to recover its watching and so any watch server must be restarted, consuming the developer's time.
master
huntc 3 years ago
parent 1dc41bc097
commit af8eb33842
  1. 1
      src/command/utils.rs

@ -37,7 +37,6 @@ fn find_manifest_from_cwd() -> Result<PathBuf, failure::Error> {
/// Construct our `pkg` directory in the crate.
pub fn create_pkg_dir(out_dir: &Path) -> Result<(), failure::Error> {
let _ = fs::remove_dir_all(&out_dir); // Clean up any existing directory and ignore errors
fs::create_dir_all(&out_dir)?;
fs::write(out_dir.join(".gitignore"), "*")?;
Ok(())

Loading…
Cancel
Save