From 04686b8433aa8cf887c642438d421246cbfa8814 Mon Sep 17 00:00:00 2001 From: Sid Vishnoi <8426945+sidvishnoi@users.noreply.github.com> Date: Wed, 29 May 2024 14:31:28 +0530 Subject: [PATCH] fix(deploy/w3c): don't crash if file is already named `Overview.html` (#183) The -n flag in mv stands for "no clobber". --- src/deploy-w3c-echidna.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/deploy-w3c-echidna.ts b/src/deploy-w3c-echidna.ts index b243f8a..284e96e 100644 --- a/src/deploy-w3c-echidna.ts +++ b/src/deploy-w3c-echidna.ts @@ -97,12 +97,12 @@ async function publish(input: Input, buildOutput: BuildResult) { const { wgDecisionURL: decision, token, cc, repository } = input; const annotation = `triggered by auto-publish spec-prod action on ${repository}`; const tarFileName = "/tmp/echidna.tar"; - await sh(`mv ${file} Overview.html`, { cwd: outputDir }); + await sh(`mv -n ${file} Overview.html`, { cwd: outputDir }); await sh(`tar cvf ${tarFileName} *`, { output: "stream", cwd: outputDir, }); - await sh(`mv Overview.html ${file}`, { cwd: outputDir }); + await sh(`mv -n Overview.html ${file}`, { cwd: outputDir }); let command = `curl '${API_URL}'`; // command += ` -F "dry-run=true"`;