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

Commit 1cd159d

Browse files
committed
Rename main template ino file
1 parent 4c89403 commit 1cd159d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

‎commands/sketch/new.go‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ func NewSketch(ctx context.Context, req *rpc.NewSketchRequest) (*rpc.NewSketchRe
6565
if err := templateDirPath.CopyDirTo(sketchDirPath); err != nil {
6666
return nil, &arduino.CantCreateSketchError{Cause: err}
6767
}
68+
69+
oldMainFilePath := sketchDirPath.Join(templateDirPath.Base() + globals.MainFileValidExtension)
70+
if err := oldMainFilePath.Rename(sketchMainFilePath); err != nil {
71+
return nil, &arduino.CantCreateSketchError{Cause: err}
72+
}
6873
} else {
6974
if err := sketchDirPath.MkdirAll(); err != nil {
7075
return nil, &arduino.CantCreateSketchError{Cause: err}

0 commit comments

Comments
(0)

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