more fixes
This commit is contained in:
parent
8e8fdd9a0b
commit
9446b5d084
2 changed files with 7 additions and 7 deletions
|
@ -6,7 +6,7 @@ public class PackageInstaller : Doable
|
|||
* Install packages from a package list file
|
||||
* This uses apt by default
|
||||
*/
|
||||
public override async Task<bool> Do()
|
||||
public override bool Do()
|
||||
{
|
||||
Console.WriteLine("Installing packages...");
|
||||
|
||||
|
@ -14,7 +14,7 @@ public class PackageInstaller : Doable
|
|||
packages = packages.Replace("\n", " ");
|
||||
|
||||
|
||||
Helper.RunCommand("apt install", $"{packages} -y");
|
||||
Helper.RunCommand("apt", $"install {packages} -y");
|
||||
|
||||
Console.WriteLine("Installed packages");
|
||||
return true;
|
||||
|
|
|
@ -2,16 +2,16 @@ namespace Setup_Workspace;
|
|||
|
||||
public class Runner : Doable
|
||||
{
|
||||
public override Task<bool> Do()
|
||||
public override bool Do()
|
||||
{
|
||||
Console.WriteLine("Running tasks");
|
||||
return Task.FromResult(true);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public abstract class Doable
|
||||
{
|
||||
public abstract Task<bool> Do();
|
||||
public abstract bool Do();
|
||||
|
||||
public List<Doable> Followup = new List<Doable>();
|
||||
|
||||
|
@ -23,9 +23,9 @@ public abstract class Doable
|
|||
return this;
|
||||
}
|
||||
|
||||
public async Task Run()
|
||||
public void Run()
|
||||
{
|
||||
if (!await Do())
|
||||
if (!Do())
|
||||
return;
|
||||
|
||||
foreach (var entry in Followup)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue