forked from flux-framework/flux-core
-
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.
cmd/flux-kvs: handle non-JSON values in "dir" cmd
Problem: the KVS allows non-JSON values to be stored, but flux kvs dir -R exits with an error if it encounters one. For each value, if it decodes as JSON, format it like before. But if it doesn't, print it directly instead of exiting. If the output is a terminal, truncate long values so they fit within the terminal width (reusing logic from the ls subcommand). Also truncate values where they contain unprintable characters or newlines. Indicate truncated values by appending "...". Fixes flux-framework#1158
- Loading branch information
Showing
1 changed file
with
95 additions
and
33 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