All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.databricks.sdk.core.utils.WindowsUtilities Maven / Gradle / Ivy

There is a newer version: 0.35.0
Show newest version
package com.databricks.sdk.core.utils;

import java.util.Arrays;
import java.util.List;

/** Windows specific utilities. */
public class WindowsUtilities implements OSUtilities {
  private final Environment env;

  public WindowsUtilities(Environment env) {
    this.env = env;
  }

  @Override
  public List getCliExecutableCommand(List cmd) {
    String cmdToString = String.join(" ", cmd);
    return Arrays.asList("cmd.exe", "/c", cmdToString);
  }

  @Override
  public String getDatabricksCliPath() {
    String path = OSUtils.findExecutable(env.getPath(), "databricks");
    if (path == null) {
      path = OSUtils.findExecutable(env.getPath(), "databricks.exe");
    }
    return path;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy