packaging

This commit is contained in:
Paul Schneider 2019-06-24 14:30:47 +01:00
commit 36722d338b
14 changed files with 61 additions and 21 deletions

View file

@ -1,4 +1,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
namespace Yavsc.Server.Models.IT.SourceCode
@ -17,5 +19,18 @@ namespace Yavsc.Server.Models.IT.SourceCode
throw new Exception ($"This directory doesn't exist: {WorkingDir},\nand cannot be used as a repository.");
}
public ProcessStartInfo CreateStartInfo(string workingDir)
{
var args = string.Join(" ", Args);
var info = new ProcessStartInfo
( _cmdPath, args )
{
WorkingDirectory = workingDir ?? WorkingDir,
RedirectStandardOutput = true,
UseShellExecute = false
};
return info;
}
}
}