Skip to content
This repository has been archived by the owner on Jun 8, 2021. It is now read-only.

Commit

Permalink
fix(context): cli.copy should not overwrite the existing file
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Aug 4, 2017
1 parent 4860502 commit 8fc3bd1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Commands/Install/Context.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@
*/

const path = require('path')
const _ = require('lodash')
const ace = require('../../../lib/ace')

class Context {
constructor (command, helpers) {
this.command = command
this.helpers = helpers
this.appDir = path.join(this.helpers.appRoot(), 'app')
}

/**
Expand Down Expand Up @@ -64,7 +66,7 @@ class Context {
* @return {void}
*/
copy (fromFile, toFile, options) {
return this.command.copy(fromFile, toFile)
return this.command.copy(fromFile, toFile, _.merge({}, { overwrite: false, errorOnExist: true }, options))
}
}

Expand Down

0 comments on commit 8fc3bd1

Please sign in to comment.