Skip to content

Commit

Permalink
Do not remove the pkg directory
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
huntc committed Feb 11, 2022
1 parent 1dc41bc commit af8eb33
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/command/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(())
Expand Down

0 comments on commit af8eb33

Please # to comment.