mirror of
https://github.com/dawidd6/action-ansible-playbook.git
synced 2026-04-28 09:12:08 -06:00
post: check if file exists before unlinking
This commit is contained in:
@@ -2,8 +2,10 @@ const core = require('@actions/core')
|
||||
const fs = require('fs')
|
||||
|
||||
function rm(file) {
|
||||
core.info(`==> Deleting "${file}" file`)
|
||||
fs.unlinkSync(file)
|
||||
if (fs.existsSync(file)) {
|
||||
core.info(`==> Deleting "${file}" file`)
|
||||
fs.unlinkSync(file)
|
||||
}
|
||||
}
|
||||
|
||||
async function main() {
|
||||
|
||||
Reference in New Issue
Block a user