diff --git a/bin/configure-fastly.js b/bin/configure-fastly.js index 657d83c56..6c2bacf11 100644 --- a/bin/configure-fastly.js +++ b/bin/configure-fastly.js @@ -177,10 +177,12 @@ async.auto({ fastly.activateVersion(results.version, function (err, response) { if (err) throw new Error(err); process.stdout.write('Successfully configured and activated version ' + response.number + '\n'); - fastly.purgeAll(FASTLY_SERVICE_ID, function (err) { - if (err) throw new Error(err); - process.stdout.write('Purged all.\n'); - }); + if (process.env.FASTLY_PURGE_ALL) { + fastly.purgeAll(FASTLY_SERVICE_ID, function (err) { + if (err) throw new Error(err); + process.stdout.write('Purged all.\n'); + }); + } }); } }