m4tx / tundra

MyAnimeList scrobbler for Linux
https://tundra.moe
GNU General Public License v3.0
52 stars 2 forks source link

Package does not build when using custom Cargo target directory #72

Closed seqre closed 10 months ago

seqre commented 1 year ago

The installation breaks when building tundra from AUR when a user has custom defined Cargo target directory.

AUR error:

error: failed to run custom build command for `tundra v0.4.0 (/home/seqre/.cache/paru/clone/tundra/src/tundra-0.4.0)`

Caused by:
  process didn't exit successfully: `/home/seqre/.cargo/target/release/build/tundra-be22d1479b53597a/build-script-build` (exit status: 101)
  --- stdout
  Creating directory: "target/locale"

  --- stderr
  thread 'main' panicked at 'Could not create translations directory: Os { code: 2, kind: NotFound, message: "No such file or directory" }', build.rs:19:32
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
==> ERROR: A failure occurred in build().
    Aborting...
error: failed to build 'tundra-0.4.0-1': 
error: packages failed to build: tundra-0.4.0-1

Example .cargo/config.toml to recreate issue:

[build]
target-dir = ".cargo/target"
m4tx commented 10 months ago

Thanks for reporting this! Fixed in f13b595a20f9fa0c191eff99c20960b201adac81.