diff --git a/src/command/publish.rs b/src/command/publish.rs index 3a39ed4..51cfdc7 100644 --- a/src/command/publish.rs +++ b/src/command/publish.rs @@ -10,7 +10,13 @@ pub fn publish(path: Option, log: &Logger) -> result::Result<(), Error> info!(&log, "Publishing the npm package..."); info!(&log, "npm info located in the npm debug log"); - npm::npm_publish(&crate_path)?; + match npm::npm_publish(&crate_path) { + Ok(r) => Ok(r), + Err(Error::Io { .. }) => Err(Error::DirNotFound { + message: "Unable to find the pkg directory".to_owned(), + }), + Err(e) => Err(e), + }?; info!(&log, "Published your package!"); PBAR.message("💥 published your package!");