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
This commit is contained in:
Joachim Breitner 2020-04-09 13:00:48 +02:00 committed by GitHub
parent a4ffdc587d
commit 42b62470e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -239,6 +239,10 @@ export async function deploy(action: ActionInterface): Promise<void> {
)
} finally {
// Ensures the deployment directory is safely removed.
await execute(
`chmod u+w -R ${temporaryDeploymentDirectory}`,
action.workspace
)
await execute(`rm -rf ${temporaryDeploymentDirectory}`, action.workspace)
}
}