Fix bug when there is no rice-box

pull/157/head
Henrique Dias 2017-07-25 16:15:28 +01:00
parent ba0b15e191
commit 50bb68ddc8
No known key found for this signature in database
GPG Key ID: 936F5EB68D786730
1 changed files with 7 additions and 2 deletions

View File

@ -10,8 +10,13 @@ var config = require('./config')
var webpackConfig = require('./webpack.dev.conf')
var fs = require('fs')
fs.unlinkSync('./rice-box.go')
fs.unlinkSync('./caddy/hugo/rice-box.go')
if (fs.existsSync('./rice-box.go')) {
fs.unlinkSync('./rice-box.go')
}
if (fs.existsSync('./caddy/hugo/rice-box.go')) {
fs.unlinkSync('./caddy/hugo/rice-box.go')
}
rm(path.join(config.assetsRoot, config.assetsSubDirectory), err => {
if (err) throw err