From a078dd84efa6bff586ab978589779b6d6bc8677b Mon Sep 17 00:00:00 2001 From: Matthias Kruk Date: Wed, 1 Dec 2021 17:17:15 +0900 Subject: [PATCH] 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. --- include/context.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 2.47.3