Skip to content

Commit 13f31dd

Browse files
committed
Remove soljson.js before downloading new one
1 parent 9e9562a commit 13f31dd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

downloadCurrentVersion.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ function getVersionList (cb) {
2828
function downloadBinary (outputName, version, expectedHash) {
2929
console.log('Downloading version', version);
3030

31+
// Remove if existing
32+
if (fs.existsSync(outputName)) {
33+
fs.unlinkSync(outputName);
34+
}
35+
3136
var file = fs.createWriteStream(outputName, { encoding: 'binary' });
3237
https.get('https://ethereum.github.io/solc-bin/bin/' + version, function (response) {
3338
if (response.statusCode !== 200) {

0 commit comments

Comments
 (0)