Skip to content

Commit 8fa1420

Browse files
mirkoCrobumirkoCrobu
andauthored
feat: fix parsing id insted of path (#518)
Co-authored-by: mirkoCrobu <mirkocrobu@NB-0531.localdomain>
1 parent 7b40c39 commit 8fa1420

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

cmd/arduino-app-cli/app/new.go

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package app
33
import (
44
"context"
55

6-
"github.com/arduino/go-paths-helper"
76
"github.com/spf13/cobra"
87

98
"github.com/bcmi-labs/orchestrator/cmd/arduino-app-cli/results"
@@ -43,16 +42,7 @@ func newCreateCmd() *cobra.Command {
4342

4443
func createHandler(ctx context.Context, name string, icon string, noPython, noSketch bool, fromApp string) error {
4544
if fromApp != "" {
46-
wd, err := paths.Getwd()
47-
if err != nil {
48-
feedback.Fatal(err.Error(), feedback.ErrGeneric)
49-
return nil
50-
}
51-
fromPath := paths.New(fromApp)
52-
if !fromPath.IsAbs() {
53-
fromPath = wd.JoinPath(fromPath)
54-
}
55-
id, err := orchestrator.NewIDFromPath(fromPath)
45+
id, err := orchestrator.ParseID(fromApp)
5646
if err != nil {
5747
feedback.Fatal(err.Error(), feedback.ErrBadArgument)
5848
return nil

0 commit comments

Comments
 (0)