From 008c393c47ecebc24ce80338922efd3c74ab3b9d Mon Sep 17 00:00:00 2001 From: Austin Burdine Date: Thu, 22 Jun 2017 20:32:52 -0400 Subject: [PATCH] feat(casper): update casper version during ghost update refs #225 - delete old casper version and replace with new one on update - short term solution --- lib/commands/update.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/commands/update.js b/lib/commands/update.js index 31d49e419..d8497676d 100644 --- a/lib/commands/update.js +++ b/lib/commands/update.js @@ -97,6 +97,16 @@ module.exports.execute = function execute(version, options) { }, { title: 'Linking things', task: tasks.link + }, { + title: 'Installing new version of Casper', + task: (ctx) => { + let casperPath = path.join(process.cwd(), 'content', 'themes', 'casper'); + + return fs.remove(casperPath).then(() => fs.move( + path.join(ctx.installPath, 'content', 'themes', 'casper'), + casperPath + )); + } }, { title: 'Restarting Ghost', task: () => startCommand.execute.call(this, {quiet: true})