Commit Graph

1085 Commits

Author SHA1 Message Date
HIROSE Masaaki
286b4b56d9 Document on exit code in case of MultiError is given 2017-01-12 19:12:17 +09:00
HIROSE Masaaki
71ced406af Treat rc first called as exit code
Because default OsExiter is os.Exit.
2017-01-12 18:59:38 +09:00
hirose31
70a2c94089 Merge branch 'master' into fix/handle-multierror 2017-01-12 18:16:34 +09:00
Péter Szilágyi
acc622e5fb
Invalidate context.setFlags cache on modification. 2017-01-11 14:38:54 +02:00
Jesse Szwedko
8ef3805c9d Merge pull request #575 from MaximilianMeister/command-ordering
command: enable ordering commands by name
2017-01-09 20:57:14 -08:00
Joe Richey
0083ae8732 Usage/Description/ArgsUsage correctly copied when using subcommand 2017-01-09 15:57:49 -08:00
Maximilian Meister
ac772237b9
command: enable ordering commands by name 2017-01-09 16:40:32 +01:00
Jesse Szwedko
8f6a3675e1 Merge pull request #581 from appleboy/patch-2
[ci skip] fix template syntax error
2017-01-08 17:29:12 -05:00
Bo-Yi Wu
4267cd827c [ci skip] Fix template syntax error 2017-01-04 10:28:58 +08:00
7250c97913 Merge branch 'master' into merging-jereksel-zsh 2016-12-21 15:11:00 -05:00
Jesse Szwedko
4401a6ca20 Merge pull request #566 from fernandezvara/v1
allow to load YAML configuration files on Windows
2016-11-27 13:44:19 -08:00
Jesse Szwedko
6752c11c1c Merge branch 'v1' into v1 2016-11-27 13:32:19 -08:00
Jesse Szwedko
0bdeddeeb0 Merge pull request #569 from urfave/prepare-1-19-1
Prep 1.19.1
2016-11-21 20:36:10 -08:00
Jesse Szwedko
0ef6582154 Prep 1.19.1 2016-11-21 20:26:35 -08:00
Jesse Szwedko
3ba36a3127 Merge pull request #568 from kklipsch/master
Fix for #556 broke the api for users who were using the ActionFunc
2016-11-21 20:21:12 -08:00
Kasey Klipsch
8fa549846e #556 broke the api for users who were using the ActionFunc 2016-11-21 09:47:23 -06:00
Antonio Fdez
6503447ae7 added comment to windows filePath check 2016-11-19 22:37:11 +01:00
Jesse Szwedko
b6061c464d Merge pull request #559 from joshuarubin/completion_fix
make shell autocomplete more robust
2016-11-19 11:05:28 -08:00
Jesse Szwedko
7fbcf2396a Update date of 1.19.0 release in CHANGELOG
[ci skip]
2016-11-19 11:04:57 -08:00
Jesse Szwedko
a8fc36b690 Update CHANGELOG 2016-11-19 10:55:36 -08:00
Jesse Szwedko
6a87e37dff Merge pull request #564 from urfave/altsrc-errorable-flag
Make ApplyWithError a public method on errorableFlag
2016-11-19 10:51:37 -08:00
Jesse Szwedko
d71794de19 Make ApplyWithError a public method on errorableFlag
Add to altsrc flags. Otherwise, flagSet() was bypassing altsrc's attempt
at shadowing.
2016-11-19 10:51:20 -08:00
Jesse Szwedko
8500a4cefd Merge pull request #567 from drekar/errorable-flag-panic-fix
errorableFlag: scope result of type assertion.
2016-11-19 10:11:24 -08:00
Joshua Rubin
2da42640ad
Merge remote-tracking branch 'origin/master' into completion_fix 2016-11-18 09:28:39 -07:00
drekar
4661a59b20 errorableFlag: scope result of type assertion. 2016-11-17 09:48:03 -10:00
Antonio Fdez
9f357f7625 fix imports
Sorry, forgot to add imports correctly, needed to edit the file and make the commit using the github online editor, since I can't access from my current location from git.
2016-11-17 17:08:01 +01:00
Antonio Fdez
dda37c45da Merge pull request #1 from fernandezvara/patch-yaml-config-windows
allow to load YAML configuration files on Windows
2016-11-17 17:01:27 +01:00
Antonio Fdez
b5d06bd2a9 allow to load YAML configuration files on Windows
The funtion `loadDataFrom` does not take care of Windows users since any of the conditions met and it returns an error.

The change looks for the runtime where it's running and then if the filePath contains a `\`
2016-11-17 16:58:46 +01:00
Joshua Rubin
3272baf434
add a test for shell completion using incomplete flags 2016-11-14 10:10:51 -07:00
Joshua Rubin
8dd1962f7b
change "complete" to "shellComplete" 2016-11-14 09:35:22 -07:00
Jesse Szwedko
b4f4786f37 Merge pull request #529 from urfave/prepare-v1.19.0
Prepare v1.19.0 release
2016-11-13 15:35:18 -08:00
Jesse Szwedko
dcdea39be2 Add additional entries to changelog for v.19.0 release 2016-11-13 15:04:31 -08:00
Jesse Szwedko
fa7ccb1447 Update changelog 2016-11-13 15:01:04 -08:00
Jesse Szwedko
4c2360f975 Prepare CHANGELOG for v1.19.0 2016-11-13 15:01:04 -08:00
Jesse Szwedko
de551c4450 Backport removal of deprecation warnings
#508
2016-11-13 15:01:04 -08:00
Jesse Szwedko
31b79c9a33 Merge pull request #530 from urfave/consider-empty-env-vars
Consider empty environment variables as set
2016-11-13 15:00:04 -08:00
Jesse Szwedko
b4a64dc08d Add windows implementation of Clearenv for tests
Apparently `Clearenv` in Windows just sets the variables to ""
2016-11-13 14:59:35 -08:00
Jesse Szwedko
e367fafa3d Return an error when parsing environment variables for values fails
Currently cli silently (aside from IntSlice and Int64Slice which oddly
printed directly to the error stream) ignores failures that occur when
parsing environment variables for their value for flags that define
environment variables. Instead, we should propogate up the error to the
user.

This is accomplished in a backwards compatible manner by adding a new,
internal, interface which defines an applyWithError function that all
flags here define. In v2, when we can modify the interface, we can drop
this secondary interface and modify `Apply` to return an error.
2016-11-13 14:59:35 -08:00
Jesse Szwedko
a00c3f5872 Consider empty environment variables as set
When assigning values to flags (also when interogatting via
`context.(Global)IsSet`.

For boolean flags, consider empty as `false`.

Using `syscall.Getenv` rather than `os.LookupEnv` in order to support
older Golang versions.
2016-11-13 14:59:27 -08:00
Jesse Szwedko
7a5dacbc41 Merge pull request #560 from mh-cbon/master
Close #558: detect FormattedError and print their stack trace
2016-11-13 13:44:15 -08:00
mh-cbon
b0a8f25773 558: handle multi formatter errors 2016-11-13 22:34:31 +01:00
Jesse Szwedko
af372e8e2a Merge branch 'master' into master 2016-11-12 14:32:21 -08:00
Jesse Szwedko
88ae7af8d4 Merge pull request #563 from urfave/print-help-if-no-action
If no action is specified on the command or app, print the help documentation
2016-11-12 13:49:46 -08:00
Jesse Szwedko
0113f56d10 If no action is specified on the command or app, print the help documentation
Rather than panic'ing or displaying an opaque error message about the
signature which is more confusing to the end user.

Fixes #562
2016-11-12 13:37:07 -08:00
Jesse Szwedko
36053a9dfd Merge branch 'master' into fix/handle-multierror 2016-11-12 12:46:57 -08:00
HIROSE Masaaki
6c50b15a27 Exit with the code of ExitCoder if exists 2016-11-11 13:11:50 +09:00
mh-cbon
79591889a9 Close #558: detect FormattedError and print their stack trace 2016-11-05 10:36:23 +01:00
Joshua Rubin
ea3df26e64
make shell autocomplete more robust 2016-11-04 14:56:28 -06:00
d86a009f5e Merge pull request #556 from urfave/use-assertions-over-reflection
Use type assertions rather than reflection to determine how to call the `Action`
2016-11-02 09:18:01 -04:00
Jesse Szwedko
b377b5d9e9 Use type assertions rather than reflection to determine how to call the Action
This has some benefits, but results in possibly less informative error
messaging; however, given that there are only two accepted types,
I think the error messaging is sufficient.
2016-11-01 20:33:12 -07:00