code: void run(List<String> arguments, @Nullable Path workingDirectory)
        throws ProcessHandlerException, CloudSdkNotFoundException, CloudSdkOutOfDateException,
            CloudSdkVersionFileException, IOException {
  
      sdk.validateCloudSdk();
  
      List<String> command = new ArrayList<>();
      command.add(sdk.getGCloudPath().toAbsolutePath().toString());
  
      command.addAll(arguments);
      if (outputFormat != null) {
        command.addAll(GcloudArgs.get("format", outputFormat));
      }
  
      if (credentialFile != null) {
        command.addAll(GcloudArgs.get("credential-file-override", credentialFile));
      }
  
      logger.info("submitting command: " + Joiner.on(" ").join(command));
  
      ProcessBuilder processBuilder = processBuilderFactory.newProcessBuilder();
      processBuilder.command(command);
      if (workingDirectory != null) {
        processBuilder.directory(workingDirectory.toFile());
      }
      processBuilder.environment().putAll(getGcloudCommandEnvironment());
      Process process = processBuilder.start();
      processHandler.handleProcess(process);
    }
docs: Launch an external process that runs gcloud.
  
  @param workingDirectory if null then the working directory of current Java process