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

com.codegik.gitflow.command.GitCommandExecutor Maven / Gradle / Ivy

package com.codegik.gitflow.command;

import org.apache.maven.plugin.logging.Log;
import org.codehaus.plexus.util.Os;
import org.codehaus.plexus.util.StringUtils;
import org.codehaus.plexus.util.cli.Commandline;



public class GitCommandExecutor extends CommandExecutor {
	private Commandline cmd;
	private Log log;


	public GitCommandExecutor(Log log) {
		this.log = log;
		this.cmd = new Commandline();
		if (StringUtils.isBlank(cmd.getExecutable())) {
			cmd.setExecutable("git" + (Os.isFamily(Os.FAMILY_WINDOWS) ? ".exe" : ""));
		}
	}


	@Override
	protected Commandline getCommandline() {
		return cmd;
	}


	@Override
	protected Log getLog() {
		return log;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy