docs: @SuppressWarnings("UseOfSystemOutOrSystemErr")
      public static StandardOutput parse(final String stdout, final boolean discardNone) throws IOException {
          if (stdout == null) {
              return new StandardOutput(Target.INHERIT, null, Redirect.INHERIT, null);
          }
          final Target target;
          Path stdoutPath = null;
          final OutputStream out;
          final String value = stdout.trim().toLowerCase(Locale.ENGLISH);
          if ("system.out".equals(value)) {
              target = Target.SYSTEM_OUT;
              out = System.out;
          } else if ("system.err".equals(value)) {
              target = Target.SYSTEM_ERR;
              out = System.err;
          } else if ("none".equals(value)) {
              if (discardNone) {
                  target = Target.DISCARDING;
                  out = DISCARDING;
              } else {
                  target = Target.COLLECTING;
                  out = new ByteArrayOutputStream();
              }
          } else {
              // Attempt to create a file
              stdoutPath = Paths.get(stdout.trim());
              if (Files.notExists(stdoutPath)) {
                  final Path parent = stdoutPath.getParent();
                  if (parent != null) {
                      Files.createDirectories(parent);
                  }
                  Files.createFile(stdoutPath);
              }
              target = Target.FILE;
              out = null;
          }
          Redirect destination = null;
          if (stdoutPath != null) {
              destination = Redirect.to(stdoutPath.toFile());
          }
          return new StandardOutput(target, out, destination, stdoutPath);
      }