8000 Make sure rm -rf actually works. (#242) · FFY00/github-pages-deploy-action@42b6247 · GitHub
[go: up one dir, main page]

Skip to content

Commit 42b6247

Browse files
authored
Make sure rm -rf actually works. (JamesIves#242)
* Make sure rm -rf actually works. This makes sure directories in `temporaryDeploymentDirectory` are writabe before attempting to remove them. Fixes: JamesIves#241 * Run formatter
1 parent a4ffdc5 commit 42b6247

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/git.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,10 @@ export async function deploy(action: ActionInterface): Promise<void> {
239239
)
240240
} finally {
241241
// Ensures the deployment directory is safely removed.
242+
await execute(
243+
`chmod u+w -R ${temporaryDeploymentDirectory}`,
244+
action.workspace
245+
)
242246
await execute(`rm -rf ${temporaryDeploymentDirectory}`, action.workspace)
243247
}
244248
}

0 commit comments

Comments
 (0)
0