Skip to content

Commit

Permalink
remove -> unlink, #148
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed Sep 18, 2019
1 parent 8d01f6f commit 86a61f3
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions js/common/writePhetioHtaccess.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,17 @@ module.exports = async function writePhetioHtaccess( passwordProtectPath, latest

// Use individual try/catch blocks to ensure atomic operations.
try {
await fs.removeFileSync( wrapperHtaccessFullPath );
await fs.unlinkSync( wrapperHtaccessFullPath );
}
catch( e ) {
winston.debug( 'did not remove wrapper htaccess ' + e );
}
catch( e ) { /* don't worry about it */ }
try {
await fs.removeFileSync( rootHtaccessFullPath );
await fs.unlinkSync( rootHtaccessFullPath );
}
catch( e ) {
winston.debug( 'did not remove root htaccess ' + e );
}
catch( e ) { /* don't worry about it */ }
}
else {
try {
Expand Down

0 comments on commit 86a61f3

Please sign in to comment.