mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
avoid mandatory console output
This commit is contained in:
parent
54631474bd
commit
57129e8968
@ -272,6 +272,29 @@ public class NBCLI implements Function<String[], Integer>, NBLabeledElement {
|
|||||||
return NBCLI.EXIT_OK;
|
return NBCLI.EXIT_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (options.wantsToCatResource()) {
|
||||||
|
final String resourceToCat = options.wantsToCatResourceNamed();
|
||||||
|
NBCLI.logger.debug(() -> "user requests to cat " + resourceToCat);
|
||||||
|
|
||||||
|
Optional<Content<?>> tocat = NBIO.classpath()
|
||||||
|
.searchPrefixes("activities")
|
||||||
|
.searchPrefixes(options.wantsIncludes())
|
||||||
|
.pathname(resourceToCat).extensionSet(RawOpsLoader.YAML_EXTENSIONS).first();
|
||||||
|
|
||||||
|
if (tocat.isEmpty()) tocat = NBIO.classpath()
|
||||||
|
.searchPrefixes().searchPrefixes(options.wantsIncludes())
|
||||||
|
.searchPrefixes(options.wantsIncludes())
|
||||||
|
.pathname(resourceToCat).first();
|
||||||
|
|
||||||
|
final Content<?> data = tocat.orElseThrow(
|
||||||
|
() -> new BasicError("Unable to find " + resourceToCat +
|
||||||
|
" in classpath to cat out"));
|
||||||
|
|
||||||
|
System.out.println(data.get());
|
||||||
|
NBCLI.logger.info(() -> "Dumped internal resource '" + data.asPath() + "' to stdout");
|
||||||
|
return NBCLI.EXIT_OK;
|
||||||
|
}
|
||||||
|
|
||||||
if (options.wantsToCopyResource()) {
|
if (options.wantsToCopyResource()) {
|
||||||
final String resourceToCopy = options.wantsToCopyResourceNamed();
|
final String resourceToCopy = options.wantsToCopyResourceNamed();
|
||||||
NBCLI.logger.debug(() -> "user requests to copy out " + resourceToCopy);
|
NBCLI.logger.debug(() -> "user requests to copy out " + resourceToCopy);
|
||||||
|
Loading…
Reference in New Issue
Block a user