Skip to content

Commit e0f2036

Browse files
fix: the fast path spells a program's path as the full path does
Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
1 parent 8f81774 commit e0f2036

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎src/build/execute.cppm‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3118,7 +3118,10 @@ std::optional<int> try_fast_run(const std::filesystem::path& projectRoot,
31183118
fast_path_end(record, true);
31193119
buildLock.reset();
31203120

3121-
auto exe = outputDir / chosen->second;
3121+
// The cache records the program's path with `/`; the full path spells it
3122+
// natively (`bin\app.exe` on Windows), and so does this one, so that the
3123+
// two compose the same argv.
3124+
auto exe = outputDir / std::filesystem::path(chosen->second).make_preferred();
31223125
auto pathCtx = mcpp::fetcher::make_path_ctx(/*cfg=*/nullptr, projectRoot);
31233126
std::vector<std::pair<std::string, std::string>> childEnv;
31243127
if (!match->runEnvKey.empty() && !match->runEnvValue.empty())

0 commit comments

Comments
 (0)