Skip to content

Commit

Permalink
fix: fix --force flag
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Feb 2, 2018
1 parent a6bc78e commit 6661ac2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ const options = {
}
}

assertServe('ts-default-serve', options)
assertBuild('ts-default-build', options, async (project) => {
assertServe('ts-class-serve', options)
assertBuild('ts-class-build', options, async (project) => {
const app = await project.read('src/App.vue')
expect(app).toMatch(`export default class App extends Vue {`)
})
4 changes: 3 additions & 1 deletion packages/@vue/cli/bin/vue.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,9 @@ function cleanArgs (cmd) {
const args = {}
cmd.options.forEach(o => {
const key = o.long.replace(/^--/, '')
if (typeof cmd[key] === 'string') {
// if an option is not present and Command has a method with the same name
// it should not be copied
if (typeof cmd[key] !== 'function') {
args[key] = cmd[key]
}
})
Expand Down

0 comments on commit 6661ac2

Please sign in to comment.