Skip to content

du: env var with a zero block size should be ignored #8916

Description

@cakebaker

While trying to reproduce #8913, I noticed that we fail if one of the block size environment variables is zero, whereas GNU du uses the default block size in such a case.

$ DU_BLOCK_SIZE=0 cargo run -q du README.md
du: invalid --block-size argument '???BUG'
$ BLOCK_SIZE=0 cargo run -q du README.md
du: invalid --block-size argument '???BUG'
$ BLOCKSIZE=0 cargo run -q du README.md
du: invalid --block-size argument '???BUG'

$ DU_BLOCK_SIZE=0 du README.md
12      README.md
$ BLOCK_SIZE=0 du README.md
12      README.md
$ BLOCKSIZE=0 du README.md
12      README.md
$ du README.md
12      README.md

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions