jp icon indicating copy to clipboard operation
jp copied to clipboard

cargo build --release fails if pandoc is not installed

Open aral opened this issue 4 years ago • 0 comments

Summary

On a system without pandoc installed, cargo build --release fails.

Error

…
   Compiling textwrap v0.11.0
   Compiling num-traits v0.2.12
error: failed to run custom build command for `jp v0.4.0 (/home/aral/sandbox/jp)`

Caused by:
  process didn't exit successfully: `/home/aral/sandbox/jp/target/release/build/jp-d5dfbed1a72c1cca/build-script-build` (exit code: 101)
  --- stderr
  thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', build.rs:7:10
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: build failed

Workaround

Comment out the import and the contents of the main function in build.rs.

Suggested fix

Either:

  • Handle error in build.rs, or
  • Document pandoc dependency in readme

Platform

Elementary OS Hera 5.1.7 (based on Ubuntu 18.04 LTS).

aral avatar Mar 07 '21 12:03 aral