49c5b765 by Adam Heath

Fix handling of first-time builds, when dist/deploy-old does not exist.

1 parent 50cb71ab
......@@ -567,7 +567,7 @@ module.exports = function (grunt) {
fs.symlinkSync(target, 'dist/next-current');
fs.renameSync('dist/next-current', 'dist/current');
if (current) {
if (fs.statSync('dist/deploy-old')) {
if (fs.existsSync('dist/deploy-old')) {
grunt.file.delete('dist/deploy-old');
}
fs.renameSync('dist/' + current, 'dist/deploy-old');
......