Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Could not remove base" error with CARGO_TARGET_DIR #215

Closed
ensc opened this issue Nov 15, 2023 · 1 comment · Fixed by #218
Closed

"Could not remove base" error with CARGO_TARGET_DIR #215

ensc opened this issue Nov 15, 2023 · 1 comment · Fixed by #218

Comments

@ensc
Copy link

ensc commented Nov 15, 2023

cargo leptos watch fails when CARGO_TARGET_DIR is set. I tried recent master (b3a556a)

  1. mkdir /tmp/test
  2. cd /tmp/test
  3. cargo leptos new --name project --git https://github.com/leptos-rs/start
  4. cd /tmp/test/project
  5. CARGO_TARGET_DIR=/tmp/test/.cache cargo leptos watch

Results in

thread 'main' panicked at src/config/project.rs:217:14:
called `Result::unwrap()` on an `Err` value: Could not remove base "/tmp/test/project" from "/tmp/test/.cache/tmp"
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Error happens at

conf.tmp_dir = cargo_metadata
.target_directory
.join("tmp")
.unbase(&cargo_metadata.workspace_root)
.unwrap();

@Maneren
Copy link
Contributor

Maneren commented Nov 15, 2023

A similar issue was fixed already in #159 but appeared again in #200 as an additional config was added. I can try fixing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants