docs: public static String generateArgline(final String scriptpath, final String[] args, final String separator, final Boolean unsafe) {
          final StringBuilder sb = new StringBuilder();
          final ArrayList<String> list = new ArrayList<String>();
          if (null != scriptpath) {
              list.add(scriptpath);
          }
          if (null != args) {
              list.addAll(Arrays.asList(args));
          }
          for (final String arg : list) {
              if(null==arg){
                  continue;
              }
              if (sb.length() > 0) {
                  sb.append(separator);
              }
              if(unsafe) {
                  /* DEPRECATED SECURITY RISK: Exists for backwards compatibility only. */
                  if (arg.indexOf(" ") >= 0 && !(0 == arg.indexOf("'") && (arg.length() - 1) == arg.lastIndexOf("'"))) {
                      sb.append("'").append(arg).append("'");
                  } else {
                      sb.append(arg);
                  }
              } else {
                  quoteUnixShellArg(sb, arg);
              }
          }
          return sb.toString();
      }