Skip to content

dart create in the current directory works differently from flutter create #61945

@gspencergoog

Description

@gspencergoog

Description

If the LLM calls create project with "." for the directory, the Flutter version will just happily call flutter create . and things work. If you do this for a Dart project, it will fail because:

Directory
'/usr/local/google/home/user/code/my_project/.'
already exists (use '--force' to force project generation).          

Which makes me think that the Dart version should automatically use --force if the argument is '.' or something. That would have side effects, though. For instance, if your cwd already has a README.md, then the --force would cause it to be overwritten instead of left alone, as the flutter command would.

Probably the real fix is that dart create . should not fail like it currently does, and might need a flag to let it act more like flutter create and not touch files that already exist.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-dart-cliUse area-dart-cli for issues related to the 'dart' command like tool.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions