Skip to content

Commit

Permalink
I guess try this...
Browse files Browse the repository at this point in the history
  • Loading branch information
IEvangelist committed Apr 26, 2024
1 parent 25b6329 commit 8406f46
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions DotNet.DocsTools/OspoClientServices/OspoClientFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,20 @@ private static async Task<bool> HasAzureCliAsync()
public static async ValueTask InstallAzureCliAsync()
{
// Install Azure CLI:
// curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
var result = await Cli.Wrap("curl")
.WithArguments([
"-sL",
"https://aka.ms/InstallAzureCLIDeb",
"|",
"sudo",
"bash"
])
// curl -sL https://aka.ms/InstallAzureCLI | bash

var curlCommand = Cli.Wrap("curl")
.WithArguments(["-sL", "https://aka.ms/InstallAzureCLI"]);

var bashCommand = Cli.Wrap("bash");

var result = await (curlCommand | bashCommand)
.WithValidation(CommandResultValidation.None)
.ExecuteAsync();
.ExecuteBufferedAsync();

var output = result.StandardOutput.Trim();

Console.WriteLine(output);

if (result.IsSuccess == false)
{
Expand Down

0 comments on commit 8406f46

Please sign in to comment.