From: Matthias Kruk Date: Wed, 1 Dec 2021 08:17:15 +0000 (+0900) Subject: include/context: Use cp to add files and logs to a context X-Git-Url: https://git.corax.cc/?a=commitdiff_plain;h=a078dd84efa6bff586ab978589779b6d6bc8677b;p=foundry include/context: Use cp to add files and logs to a context Files and logs are moved when they are added to a context. However, this will fail if there are multiple processes trying to move artifacts from one context to another. This commit modifies the context module to copy files and logs instead of moving them. --- diff --git a/include/context.sh b/include/context.sh index 47caae8..0a5747b 100644 --- a/include/context.sh +++ b/include/context.sh @@ -82,7 +82,7 @@ foundry_context_add_file() { return 1 fi - if ! mv "$file" "$file_path/."; then + if ! cp "$file" "$file_path/."; then return 1 fi @@ -128,7 +128,7 @@ foundry_context_add_log() { return 1 fi - if ! mv "$log" "$logdir/."; then + if ! cp "$log" "$logdir/."; then return 1 fi