Skip to content

Commit

Permalink
Leave results in cache if can't write target dir
Browse files Browse the repository at this point in the history
  • Loading branch information
grillo-delmal committed Aug 5, 2024
1 parent fbf3c17 commit fe3c077
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions source/dub/generators/build.d
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,13 @@ class BuildGenerator : ProjectGenerator {
target_binary_path = getTargetPath(cbuildsettings, settings);

if (!settings.tempBuild) {
copyTargetFile(target_path, buildsettings, settings);
updateCacheDatabase(settings, cbuildsettings, pack, config, build_id, target_binary_path.toNativeString());
try {
copyTargetFile(target_path, buildsettings, settings);
updateCacheDatabase(settings, cbuildsettings, pack, config, build_id, target_binary_path.toNativeString());
} catch (std.file.FileException e) {
logWarn("Can't copy result to target, leaving it in the cache.");
logDiagnostic("Full error: %s", e.toString().sanitize);
}
}

return false;
Expand Down

0 comments on commit fe3c077

Please sign in to comment.