Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

"sketch new ." overwriting sketch without confirmation #1175

Closed
Assignees
Labels
topic: codeRelated to content of the project itself type: imperfectionPerceived defect in any part of project
@xax

Description

Bug Report

Current behavior

Running arduino-cli sketch new . (← note the dot) from a sketch directory overwrites an existing .inosketch file without asking for confirmation, sketch folder (by accident or not) indeed not empty.

Consider for example the following situation (noted bash-like, though see system used below):

$ ls -R
.:
sketch_foo
./sketch_foo:
sketch_foo.ino
$
$ cd sketch_foo
$ arduino-cli sketch new .
$ # sketch_foo.ino will be overwritten with template boilerplate

Expected behavior

The command should not be destructive like that by default. fletch new should not overwrite anything; probably a flag forcing to overwrite may be useful.

Environment

  • CLI version (output of arduino-cli version):
    arduino-cli alpha Version: 0.15.1 Commit: c7403ed Date: 2021年02月04日T10:11:39Z
  • OS and platform:
    Windows 10 [Version 10.0.19042.789], x64

Metadata

Metadata

Labels

topic: codeRelated to content of the project itself type: imperfectionPerceived defect in any part of project

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions

    AltStyle によって変換されたページ (->オリジナル) /