Skip to content

[EDGE CASE] Bad preset naming might break the functionality. #1871

Closed
@serkanyersen

Description

@serkanyersen

Version

3.0.0-rc.5

Reproduction link

https://github.com/vuejs/vue-cli

Steps to reproduce

I know this is the wrong usage, but when I initially used the presets I though it was going to create a preset file in the directory. so when asked I named the preset as project.json

  • vue create project

  • select any option you want, on the last step, say Y to Save this as a preset for future projects?

  • Type project.json to Save preset as: question. It could be anything, just add an extension to the name.

  • type vue create again, and select project.json should appear at the top.

What is expected?

I guess it should initiate the preset without error. or it shouldn't let me type invalid name for a preset in the first place.

What is actually happening?

vue create fails with Error: ENOENT: no such file or directory, open 'project.json' error
screen shot 2018-07-16 at 14 20 59


Also couldn't find a way to list or edit the presets after they are created. only way seems to be manually editing ~/.vuerc file. Which is totally fine, just wanted to point out.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions