Movatterモバイル変換


[0]ホーム

URL:


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

Commit1cd159d

Browse files
committed
Rename main template ino file
1 parent4c89403 commit1cd159d

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
iferr:=templateDirPath.CopyDirTo(sketchDirPath);err!=nil {
6666
returnnil,&arduino.CantCreateSketchError{Cause:err}
6767
}
68+
69+
oldMainFilePath:=sketchDirPath.Join(templateDirPath.Base()+globals.MainFileValidExtension)
70+
iferr:=oldMainFilePath.Rename(sketchMainFilePath);err!=nil {
71+
returnnil,&arduino.CantCreateSketchError{Cause:err}
72+
}
6873
}else {
6974
iferr:=sketchDirPath.MkdirAll();err!=nil {
7075
returnnil,&arduino.CantCreateSketchError{Cause:err}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp