Explorar el Código

Create uppy webdir if it does not exist

Kevin van Zonneveld hace 9 años
padre
commit
13686f6acd
Se han modificado 1 ficheros con 6 adiciones y 1 borrados
  1. 6 1
      website/update.js

+ 6 - 1
website/update.js

@@ -52,7 +52,12 @@ var saveConfig = Object.assign({}, defaultConfig, loadedConfig, scanConfig)
 fs.writeFileSync(configPath, YAML.safeDump(saveConfig), 'utf-8')
 console.info(chalk.green('✓ rewritten: '), chalk.dim(configPath))
 
-exec('cp -vfR ' + uppyRoot + '/dist/* ' + webRoot + '/themes/uppy/source/uppy', function (error, stdout, stderr) {
+var cmds = [
+  'mkdir -p ' + webRoot + '/themes/uppy/source/uppy',
+  'cp -vfR ' + uppyRoot + '/dist/* ' + webRoot + '/themes/uppy/source/uppy/'
+].join(' && ')
+
+exec(cmds, function (error, stdout, stderr) {
   if (error) {
     console.error(
       chalk.red('x failed to inject: '),