Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
AliveDevil committed Jun 14, 2024
1 parent 4baf2eb commit 8d78628
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/CleanCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ private static int Execute(CleanCommandSettings settings)
{
try
{
WriteLine($"Unregistering Sync Root {syncRoot.DisplayNameResource} ({syncRoot.Path})");
WriteLine($"Unregistering Sync Root {syncRoot.DisplayNameResource} ({syncRoot.Path.Path})");
if (settings.Confirm && !Confirm("Continue?"))
{
continue;
Expand All @@ -74,7 +74,7 @@ private static int Execute(CleanCommandSettings settings)
StorageProviderSyncRootManager.Unregister(syncRoot.Id);
}

MarkupLineInterpolated($"{WhatIf(settings.WhatIf, true)}Unregistered Sync Root {syncRoot.DisplayNameResource}");
MarkupLineInterpolated($"[yellow]{WhatIf(settings.WhatIf)}[/]Unregistered Sync Root {syncRoot.DisplayNameResource}");
}
catch (Exception e)
{
Expand Down
8 changes: 1 addition & 7 deletions src/GlobalUsings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,6 @@ under certain conditions

public static string UsageFormat = $"Usage: {Process.GetCurrentProcess().ProcessName} {{0}} {{1}}";

public static string WhatIf(bool whatIf, bool markup)
=> (whatIf, markup) switch
{
(false, _) => "",
(true, false) => "WhatIf: ",
(true, true) => "[yellow]WhatIf: [/]"
};
public static string WhatIf(bool whatIf) => whatIf ? "WhatIf: " : "";
}
}

0 comments on commit 8d78628

Please sign in to comment.