public void rmview(String viewPath) throws IOException, InterruptedException {
    ArgumentListBuilder cmd = new ArgumentListBuilder();
    cmd.add("rmview");
    cmd.add("-force");
    cmd.add(viewPath);

    FilePath workspace = launcher.getWorkspace();
    String output = runAndProcessOutput(cmd, null, workspace, false, null);

    if (output.contains("cleartool: Error")) {
      throw new IOException("Failed to remove view: " + output);
    }

    FilePath viewFilePath = workspace.child(viewPath);
    if (viewFilePath.exists()) {
      launcher
          .getListener()
          .getLogger()
          .println("Removing view folder as it was not removed when the view was removed.");
      viewFilePath.deleteRecursive();
    }
  }