### Version 3.0.0-beta.16 ### Reproduction link [https://codesandbox.io/s/yp18qom2kx](https://codesandbox.io/s/yp18qom2kx) ### Steps to reproduce 1\. Already have a `--mode` flag in script command. ```javascript // package.json { "scripts": { "build:dev": "vue-cli-service build --mode build-dev" }, // ... } ``` 2\. Run the task in ui will get this: ```bash $ vue-cli-service build --mode build-dev --mode development --dest dist --target app --dashboard ``` It still adds a `--mode` flag even the command has one. ### What is expected? Use the correct mode value from command `--mode`. ### What is actually happening? Have two `--mode` in the command. <!-- generated by vue-issues. DO NOT REMOVE -->