Use custom error message for publish

master
Mackiovello 7 years ago
parent 035bcbe688
commit ec17b8aa7e
  1. 8
      src/command/publish.rs

@ -10,7 +10,13 @@ pub fn publish(path: Option<String>, log: &Logger) -> result::Result<(), Error>
info!(&log, "Publishing the npm package..."); info!(&log, "Publishing the npm package...");
info!(&log, "npm info located in the npm debug log"); 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!"); info!(&log, "Published your package!");
PBAR.message("💥 published your package!"); PBAR.message("💥 published your package!");

Loading…
Cancel
Save