org.eclipse.jgit.util.FS.execute()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(2.1k)|赞(0)|评价(0)|浏览(116)

本文整理了Java中org.eclipse.jgit.util.FS.execute()方法的一些代码示例,展示了FS.execute()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。FS.execute()方法的具体详情如下:
包路径:org.eclipse.jgit.util.FS
类名称:FS
方法名:execute

FS.execute介绍

[英]Execute a command defined by a java.lang.ProcessBuilder.
[中]执行由java语言定义的命令。lang.ProcessBuilder。

代码示例

代码示例来源:origin: org.eclipse.jgit/org.eclipse.jgit

try {
  result = fs.execute(filterProcessBuilder, ol.openStream());
  rc = result.getRc();
  if (rc == 0) {

代码示例来源:origin: org.eclipse.jgit/org.eclipse.jgit

ExecutionResult result;
try {
  result = fs.execute(filterProcessBuilder, in);
} catch (IOException | InterruptedException e) {
  throw new IOException(new FilterFailedException(e,

代码示例来源:origin: berlam/github-bucket

try {
  result = fs.execute(filterProcessBuilder, ol.openStream());
  rc = result.getRc();
  if (rc == 0) {

代码示例来源:origin: sonia.jgit/org.eclipse.jgit

private InputStream filterClean(InputStream in, OperationType opType)
    throws IOException {
  in = handleAutoCRLF(in, opType);
  String filterCommand = getCleanFilterCommand();
  if (filterCommand != null) {
    FS fs = repository.getFS();
    ProcessBuilder filterProcessBuilder = fs.runInShell(filterCommand,
        new String[0]);
    filterProcessBuilder.directory(repository.getWorkTree());
    filterProcessBuilder.environment().put(Constants.GIT_DIR_KEY,
        repository.getDirectory().getAbsolutePath());
    ExecutionResult result;
    try {
      result = fs.execute(filterProcessBuilder, in);
    } catch (IOException | InterruptedException e) {
      throw new IOException(new FilterFailedException(e,
          filterCommand, getEntryPathString()));
    }
    int rc = result.getRc();
    if (rc != 0) {
      throw new IOException(new FilterFailedException(rc,
          filterCommand, getEntryPathString(),
          result.getStdout().toByteArray(MAX_EXCEPTION_TEXT_SIZE),
          RawParseUtils.decode(result.getStderr()
              .toByteArray(MAX_EXCEPTION_TEXT_SIZE))));
    }
    return result.getStdout().openInputStream();
  }
  return in;
}

代码示例来源:origin: berlam/github-bucket

ExecutionResult result;
try {
  result = fs.execute(filterProcessBuilder, in);
} catch (IOException | InterruptedException e) {
  throw new IOException(new FilterFailedException(e,

代码示例来源:origin: sonia.jgit/org.eclipse.jgit

try {
  result = fs.execute(filterProcessBuilder, ol.openStream());
  rc = result.getRc();
  if (rc == 0) {

相关文章