com.databricks.sdk.core.utils.WindowsUtilities Maven / Gradle / Ivy
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