Skip to content

ninja -t helpers are inconsistent about whether filenames are quoted #2658

@jyn514

Description

@jyn514

consider the following two commands:

$ ninja -t targets rule frontmatter | rg '!.md.json'
.build/2018-02-14-Speed-Up!.md.json
$ ninja -t inputs | rg '!.md.json'
'.build/2018-02-14-Speed-Up!.md.json'

in -t targets, the file path is printed as a literal string. in -t inputs, shell quoting rules are applied.

i think -t inputs is in the wrong here: the path is not embedded inside a command string, so there's no reason to quote it. but fixing it is probably hard due to backwards compatibility. maybe ninja could add a -t inputs-unquoted? or -t inputs could take an --unquoted flag?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions