Skip to content

Commit 4c2d969

Browse files
committed
add file check befor delete
1 parent 2d6e5ea commit 4c2d969

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

bioconda-backup/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,9 @@ getContainers(options).then((containers) => {
638638
}).then(() => {
639639
console.log('done', total, docker_errors, quay_errors);
640640
fs.unlinkSync(`${config.workdir}/sync.lock`);
641-
fs.unlinkSync(`${config.workdir}/${containerFileList}`)
641+
if(fs.existsSync(`${config.workdir}/${containerFileList}`)) {
642+
fs.unlinkSync(`${config.workdir}/${containerFileList}`)
643+
}
642644
process.exit(0);
643645
}).catch(err => {
644646
console.error('oopps!', err, docker_errors, quay_errors);

0 commit comments

Comments
 (0)