[ 
https://issues.apache.org/jira/browse/MYNEWT-639?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15884397#comment-15884397
 ] 

ASF subversion and git services commented on MYNEWT-639:
--------------------------------------------------------

Commit 14b40595477fab94b099691ef7e18c37c7dcb606 in incubator-mynewt-newt's 
branch refs/heads/develop from [~cwanda]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-mynewt-newt.git;h=14b4059 
]

MYNEWT-639 Add help text and check for pkg name
1) Update help text for "newt pkg new" to have package name input.
2) Error check that a package name is provided for the command.
3) Changed "libs/mylib" to "sys/mylib" in "newt pkg" help text to reflect 
latest source structure.
   (this change is not related to MYNEWT-639)
4) Added <package-name> argument to "newt pkg remove" Usage help text


> 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)

Reply via email to