mirror of
https://github.com/dawidd6/action-ansible-playbook.git
synced 2024-12-28 02:56:09 -07:00
post: check if file exists before unlinking
This commit is contained in:
parent
145a900758
commit
81f2a15778
6
post.js
6
post.js
|
@ -2,8 +2,10 @@ const core = require('@actions/core')
|
||||||
const fs = require('fs')
|
const fs = require('fs')
|
||||||
|
|
||||||
function rm(file) {
|
function rm(file) {
|
||||||
core.info(`==> Deleting "${file}" file`)
|
if (fs.existsSync(file)) {
|
||||||
fs.unlinkSync(file)
|
core.info(`==> Deleting "${file}" file`)
|
||||||
|
fs.unlinkSync(file)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function main() {
|
async function main() {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user