Skip to content

PathFlag regression in v3 #2125

Closed
Closed

Description

@imunhatep

My urfave/cli version is

v3

Checklist

  • Are you running the latest v3 release? The list of releases is here.
  • Did you check the manual for your release? The v3 manual is here
  • Did you perform a search about this problem? Here's the GitHub guide about searching.

Dependency Management

  • My project is using vendoring.

Describe the bug

A clear and concise description of what the bug is.

To reproduce

&cli.Command{
		Name:      "example",
		Flags: []cli.Flag{
			&cli.PathFlag{
				Name:     "file",
				Aliases:  []string{"f"},
			},
		},
	}

Expected behavior

PathFlag exists/replaced with some approach

Activity

  1. added
    kind/bug
    status/triage
    area/v3
    on May 7, 2025
  2. dearchap commented on May 10, 2025

    @dearchap
    Contributor

    @imunhatep Please use StringFlag and set the "TakesFile" field to true

  3. imunhatep commented on May 16, 2025

    @imunhatep
    Author

    Thank you for clarifying this one, did I miss this one in the migration documentation v2 -> v3? Probably can be closed, if only to clarify this part in the docs.

  4. dearchap commented on May 16, 2025

    @dearchap
    Contributor

    Will keep it open until we can fix the docs. Thanks for reporting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/v3kind/bugstatus/triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions