mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
chore(deps): upgrade urfave/cli from v1 to v3
Migrate from urfave/cli v1 (maintenance mode) to v3 to benefit from active development, improved features, and long-term support. Signed-off-by: lifubang <lifubang@acmcoder.com>
This commit is contained in:
+5
-5
@@ -15,7 +15,7 @@ import (
|
||||
"github.com/opencontainers/runc/libcontainer"
|
||||
"github.com/opencontainers/runtime-spec/specs-go"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/urfave/cli"
|
||||
"github.com/urfave/cli/v3"
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
@@ -25,12 +25,12 @@ type notifySocket struct {
|
||||
socketPath string
|
||||
}
|
||||
|
||||
func newNotifySocket(context *cli.Context, notifySocketHost, id string) *notifySocket {
|
||||
func newNotifySocket(cmd *cli.Command, notifySocketHost, id string) *notifySocket {
|
||||
if notifySocketHost == "" {
|
||||
return nil
|
||||
}
|
||||
|
||||
root := filepath.Join(context.GlobalString("root"), id)
|
||||
root := filepath.Join(cmd.String("root"), id)
|
||||
socketPath := filepath.Join(root, "notify", "notify.sock")
|
||||
|
||||
notifySocket := ¬ifySocket{
|
||||
@@ -84,8 +84,8 @@ func (s *notifySocket) setupSocketDirectory() error {
|
||||
return os.Mkdir(path.Dir(s.socketPath), 0o755)
|
||||
}
|
||||
|
||||
func notifySocketStart(context *cli.Context, notifySocketHost, id string) (*notifySocket, error) {
|
||||
notifySocket := newNotifySocket(context, notifySocketHost, id)
|
||||
func notifySocketStart(cmd *cli.Command, notifySocketHost, id string) (*notifySocket, error) {
|
||||
notifySocket := newNotifySocket(cmd, notifySocketHost, id)
|
||||
if notifySocket == nil {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user