mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
deps: bump urfave/cli
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
Generated
+5
@@ -3,3 +3,8 @@ coverage.txt
|
||||
node_modules/
|
||||
vendor
|
||||
.idea
|
||||
/.local/
|
||||
/internal/
|
||||
/site/
|
||||
package.json
|
||||
package-lock.json
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2016 Jeremy Saenz & Contributors
|
||||
Copyright (c) 2023 Jeremy Saenz & Contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
+10
-39
@@ -1,13 +1,10 @@
|
||||
cli
|
||||
===
|
||||
|
||||
[](https://travis-ci.org/urfave/cli)
|
||||
[](https://ci.appveyor.com/project/urfave/cli)
|
||||
|
||||
[](https://godoc.org/github.com/urfave/cli)
|
||||
[](https://codebeat.co/projects/github-com-urfave-cli)
|
||||
[](https://github.com/urfave/cli/actions/workflows/cli.yml)
|
||||
[](https://pkg.go.dev/github.com/urfave/cli/)
|
||||
[](https://goreportcard.com/report/urfave/cli)
|
||||
[](https://codecov.io/gh/urfave/cli)
|
||||
[](https://codecov.io/gh/urfave/cli)
|
||||
|
||||
cli is a simple, fast, and fun package for building command line apps in Go. The
|
||||
goal is to enable developers to write fast and distributable command line
|
||||
@@ -15,29 +12,19 @@ applications in an expressive way.
|
||||
|
||||
## Usage Documentation
|
||||
|
||||
Usage documentation exists for each major version
|
||||
|
||||
- `v1` - [./docs/v1/manual.md](./docs/v1/manual.md)
|
||||
- `v2` - 🚧 documentation for `v2` is WIP 🚧
|
||||
Usage documentation for `v1` is available [at the docs
|
||||
site](https://cli.urfave.org/v1/getting-started/) or in-tree at
|
||||
[./docs/v1/manual.md](./docs/v1/manual.md)
|
||||
|
||||
## Installation
|
||||
|
||||
Make sure you have a working Go environment. Go version 1.10+ is supported. [See
|
||||
the install instructions for Go](http://golang.org/doc/install.html).
|
||||
|
||||
### GOPATH
|
||||
|
||||
Make sure your `PATH` includes the `$GOPATH/bin` directory so your commands can
|
||||
be easily used:
|
||||
```
|
||||
export PATH=$PATH:$GOPATH/bin
|
||||
```
|
||||
Make sure you have a working Go environment. Go version 1.18+ is supported.
|
||||
|
||||
### Supported platforms
|
||||
|
||||
cli is tested against multiple versions of Go on Linux, and against the latest
|
||||
released version of Go on OS X and Windows. For full details, see
|
||||
[`./.travis.yml`](./.travis.yml) and [`./appveyor.yml`](./appveyor.yml).
|
||||
cli is tested against multiple versions of Go on Linux, and against the latest released
|
||||
version of Go on OS X and Windows. For full details, see
|
||||
[./.github/workflows/cli.yml](./.github/workflows/cli.yml).
|
||||
|
||||
### Build tags
|
||||
|
||||
@@ -62,19 +49,3 @@ import (
|
||||
)
|
||||
...
|
||||
```
|
||||
|
||||
### Using `v2` releases
|
||||
|
||||
**Warning**: `v2` is in a pre-release state.
|
||||
|
||||
```
|
||||
$ go get github.com/urfave/cli.v2
|
||||
```
|
||||
|
||||
```go
|
||||
...
|
||||
import (
|
||||
"github.com/urfave/cli.v2" // imports as package "cli"
|
||||
)
|
||||
...
|
||||
```
|
||||
|
||||
+4
-4
@@ -248,7 +248,7 @@ func (a *App) Run(arguments []string) (err error) {
|
||||
return cerr
|
||||
}
|
||||
|
||||
if a.After != nil {
|
||||
if a.After != nil && !context.shellComplete {
|
||||
defer func() {
|
||||
if afterErr := a.After(context); afterErr != nil {
|
||||
if err != nil {
|
||||
@@ -260,7 +260,7 @@ func (a *App) Run(arguments []string) (err error) {
|
||||
}()
|
||||
}
|
||||
|
||||
if a.Before != nil {
|
||||
if a.Before != nil && !context.shellComplete {
|
||||
beforeErr := a.Before(context)
|
||||
if beforeErr != nil {
|
||||
a.handleExitCoder(context, beforeErr)
|
||||
@@ -374,7 +374,7 @@ func (a *App) RunAsSubcommand(ctx *Context) (err error) {
|
||||
return cerr
|
||||
}
|
||||
|
||||
if a.After != nil {
|
||||
if a.After != nil && !context.shellComplete {
|
||||
defer func() {
|
||||
afterErr := a.After(context)
|
||||
if afterErr != nil {
|
||||
@@ -388,7 +388,7 @@ func (a *App) RunAsSubcommand(ctx *Context) (err error) {
|
||||
}()
|
||||
}
|
||||
|
||||
if a.Before != nil {
|
||||
if a.Before != nil && !context.shellComplete {
|
||||
beforeErr := a.Before(context)
|
||||
if beforeErr != nil {
|
||||
a.handleExitCoder(context, beforeErr)
|
||||
|
||||
-28
@@ -1,28 +0,0 @@
|
||||
version: "{build}"
|
||||
|
||||
os: Windows Server 2016
|
||||
|
||||
image: Visual Studio 2017
|
||||
|
||||
clone_folder: c:\gopath\src\github.com\urfave\cli
|
||||
|
||||
cache:
|
||||
- node_modules
|
||||
|
||||
environment:
|
||||
GOPATH: C:\gopath
|
||||
GOVERSION: 1.11.x
|
||||
GO111MODULE: on
|
||||
GOPROXY: https://proxy.golang.org
|
||||
|
||||
install:
|
||||
- set PATH=%GOPATH%\bin;C:\go\bin;%PATH%
|
||||
- go version
|
||||
- go env
|
||||
- go get github.com/urfave/gfmrun/cmd/gfmrun
|
||||
- go mod vendor
|
||||
|
||||
build_script:
|
||||
- go run build.go vet
|
||||
- go run build.go test
|
||||
- go run build.go gfmrun docs/v1/manual.md
|
||||
+5
-3
@@ -98,8 +98,10 @@ type Commands []Command
|
||||
|
||||
// Run invokes the command given the context, parses ctx.Args() to generate command-specific flags
|
||||
func (c Command) Run(ctx *Context) (err error) {
|
||||
if len(c.Subcommands) > 0 {
|
||||
return c.startApp(ctx)
|
||||
if !c.SkipFlagParsing {
|
||||
if len(c.Subcommands) > 0 {
|
||||
return c.startApp(ctx)
|
||||
}
|
||||
}
|
||||
|
||||
if !c.HideHelp && (HelpFlag != BoolFlag{}) {
|
||||
@@ -261,7 +263,7 @@ func reorderArgs(commandFlags []Flag, args []string) []string {
|
||||
|
||||
// argIsFlag checks if an arg is one of our command flags
|
||||
func argIsFlag(commandFlags []Flag, arg string) bool {
|
||||
if arg == "-" || arg == "--"{
|
||||
if arg == "-" || arg == "--" {
|
||||
// `-` is never a flag
|
||||
// `--` is an option-value when following a flag, and a delimiter indicating the end of options in other cases.
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user