You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@mynewt.apache.org by "Wanda Chiu (JIRA)" <ji...@apache.org> on 2017/02/25 14:28:44 UTC

[jira] [Resolved] (MYNEWT-639) newt pkg new command does not error check or show in help text that package location is needed as an argument.

     [ https://issues.apache.org/jira/browse/MYNEWT-639?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Wanda Chiu resolved MYNEWT-639.
-------------------------------
    Resolution: Fixed

> newt pkg new command does not error check or show in help text that package location is needed as an argument.
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: MYNEWT-639
>                 URL: https://issues.apache.org/jira/browse/MYNEWT-639
>             Project: Mynewt
>          Issue Type: Bug
>          Components: Newt
>    Affects Versions: v1_0_0_beta2
>            Reporter: Wanda Chiu
>            Assignee: Wanda Chiu
>            Priority: Minor
>             Fix For: v1_0_0_rel
>
>
> 1) The current "newt pkg new" command help text  does not indicate package location as an input parameter:
> {code}
> newt pkg new -h
> Create a new package, from a template
> Usage:
>   newt pkg new [flags]
> Flags:
>   -t, --type string   Type of package to create: pkg, bsp, sdk.  Default pkg. (default "pkg")
> {code}
> 2) The command does not error check whether the location is specified and assumes one is provided. " newt pkg new" causes a  go runtime error. 
> {code}
> panic: runtime error: index out of range
> goroutine 1 [running]:
> panic(0x40edc0, 0xc4200120d0)
> 	/usr/local/Cellar/go/1.7.4_2/libexec/src/runtime/panic.go:500 +0x1a1
> mynewt.apache.org/newt/newt/cli.pkgNewCmd(0xc42014eb40, 0x6aa9a8, 0x0, 0x0)
> 	/Users/wanda/mydev/go/src/mynewt.apache.org/newt/newt/cli/pkg_cmds.go:43 +0x125
> mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra.(*Command).execute(0xc42014eb40, 0x6aa9a8, 0x0, 0x0, 0xc42014eb40, 0x6aa9a8)
> 	/Users/wanda/mydev/go/src/mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra/command.go:636 +0x443
> mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc4200a1200, 0xffffffffffffffff, 0x3, 0x47cc01)
> 	/Users/wanda/mydev/go/src/mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra/command.go:722 +0x367
> mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra.(*Command).Execute(0xc4200a1200, 0x47cc01, 0x3)
> 	/Users/wanda/mydev/go/src/mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra/command.go:681 +0x2b
> main.main()
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)