Fix handling of first-time builds, when dist/deploy-old does not exist.
Showing
1 changed file
with
1 additions
and
1 deletions
... | @@ -567,7 +567,7 @@ module.exports = function (grunt) { | ... | @@ -567,7 +567,7 @@ module.exports = function (grunt) { |
567 | fs.symlinkSync(target, 'dist/next-current'); | 567 | fs.symlinkSync(target, 'dist/next-current'); |
568 | fs.renameSync('dist/next-current', 'dist/current'); | 568 | fs.renameSync('dist/next-current', 'dist/current'); |
569 | if (current) { | 569 | if (current) { |
570 | if (fs.statSync('dist/deploy-old')) { | 570 | if (fs.existsSync('dist/deploy-old')) { |
571 | grunt.file.delete('dist/deploy-old'); | 571 | grunt.file.delete('dist/deploy-old'); |
572 | } | 572 | } |
573 | fs.renameSync('dist/' + current, 'dist/deploy-old'); | 573 | fs.renameSync('dist/' + current, 'dist/deploy-old'); | ... | ... |
-
Please register or sign in to post a comment