【发布时间】:2017-07-06 13:30:05
【问题描述】:
您好,我有以下代码
string newDist = destination + "/" + fileName;
var o = new Process
{
StartInfo =
{
FileName = pathToGitClient,
Arguments = $"-c \"eval $(ssh-agent) && ssh-add {privateKey} && git clone {repoUrl} {repoDest}\""
}
};
o.Start();
这基本上在我的 git 文件夹中使用 git-bash.exe 创建了一个 git clone 进程。如果我想在克隆时隐藏命令行窗口,我该怎么做?
我试过了
o.StartInfo.UseShellExecute = false;
o.StartInfo.CreateNoWindow = true;
但是没用
【问题讨论】:
标签: c# git bash github process