From 42b62470e42b818599bac2f03d00a3710c3b577c Mon Sep 17 00:00:00 2001 From: Joachim Breitner Date: Thu, 9 Apr 2020 13:00:48 +0200 Subject: [PATCH] Make sure rm -rf actually works. (#242) * Make sure rm -rf actually works. This makes sure directories in `temporaryDeploymentDirectory` are writabe before attempting to remove them. Fixes: #241 * Run formatter --- src/git.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/git.ts b/src/git.ts index 01e66fa7..c7973287 100644 --- a/src/git.ts +++ b/src/git.ts @@ -239,6 +239,10 @@ export async function deploy(action: ActionInterface): Promise { ) } finally { // Ensures the deployment directory is safely removed. + await execute( + `chmod u+w -R ${temporaryDeploymentDirectory}`, + action.workspace + ) await execute(`rm -rf ${temporaryDeploymentDirectory}`, action.workspace) } }