Skip to content

Empty path entries discard all other input paths #585

Closed

Description

@mrswastik-robot

Blank or empty path entries cause dust to fail the whole run and drop every other valid path.

This happens with:

  • A blank line in a --files-from list
  • An empty CLI path argument (e.g. dust DIR_A "" DIR_B)

Example:

mkdir -p /tmp/a /tmp/b
echo x > /tmp/a/f
echo y > /tmp/b/g

printf '%s\n\n%s\n' /tmp/a /tmp/b > /tmp/paths.txt
dust -P -b -c -d 0 --files-from /tmp/paths.txt

Actual:

No such file or directory: 

Expected:

 Ignore the blank/empty entry, scan the valid paths, and show both directories (same idea as --files0-from, which already skips empty segments).

The same failure occurs with:

dust -P -b -c -d 0 /tmp/a "" /tmp/b

Let me know if this is something of interest; I will be happy to open a PR :)

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions