forked from kubernetes/kubernetes
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix du command to be portable (kubernetes#95172)
The `-B 1` argument is not defiend in POSIX du[1] and does not work with busybox du. Fix this by using `-k` and append "Ki" for the ParseQuantity call. `resource.ParseQuantity()` will set the format to `BinarySI` when there is a "Ki" suffix so we can remove the explicit set of the format. [1]: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/du.html Signed-off-by: Natanael Copa <ncopa@mirantis.com>
- Loading branch information
Showing
2 changed files
with
5 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters