Update packages/k8s/src/hooks/run-script-step.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Nikola Jokic
2025-12-08 12:50:34 +01:00
committed by GitHub
parent fe1fa3ed2d
commit 801a447f60

View File

@@ -50,7 +50,7 @@ export async function runScriptStep(
// Overwrite _runner_file_commands
'[ -d "$SRC/_runner_file_commands" ] && mkdir -p "$DST/_runner_file_commands" && cp -a "$SRC/_runner_file_commands/." "$DST/_runner_file_commands/" || true',
// Append other files if missing
'find "$SRC" -type f ! -path "*/_runner_file_commands/*" | while read -r f; do rel=${f#"$SRC/"}; target="$DST/$rel"; dir=$(dirname "$target"); if [ ! -e "$target" ]; then mkdir -p "$dir"; cp -a "$f" "$target"; fi; done',
'find "$SRC" -type f ! -path "*/_runner_file_commands/*" -exec sh -c '\''rel="${1#$2/}"; target="$3/$rel"; dir=$(dirname "$target"); if [ ! -e "$target" ]; then mkdir -p "$dir" && cp -a "$1" "$target"; fi'\'' _ {} "$SRC" "$DST" \;',
// Remove _temp_pre after merging
'rm -rf /__w/_temp_pre'
]