From 7e9c5c41f3eff94ee450ccb6fecb922e17b5e1e0 Mon Sep 17 00:00:00 2001 From: cat_in_136 Date: Sun, 28 May 2023 07:31:06 +0900 Subject: [PATCH] target path for `--profile dev` refer to `target/debug/foobar` --- src/config/file_info.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/config/file_info.rs b/src/config/file_info.rs index c51ae88..620da88 100644 --- a/src/config/file_info.rs +++ b/src/config/file_info.rs @@ -108,7 +108,11 @@ impl FileInfo<'_, '_, '_, '_> { parent: P, idx: usize, ) -> Result, ConfigError> { - let profile = build_target.profile.as_deref().unwrap_or("release"); + let profile = match build_target.profile.as_deref() { + Some(v) if v == "dev" => "debug", + Some(v) => v, + None => "release", + }; let source = self .source .strip_prefix("target/release/")