From 1158149c61c278d74eaa8f7501767ceee9595075 Mon Sep 17 00:00:00 2001 From: "deniz_irgin@yahoo.com" Date: Thu, 11 Mar 2021 00:23:01 +0300 Subject: [PATCH] fix aws executable path problem for new aws cli versions. fixes #3 --- src/LocalStack.AwsLocal/CommandDispatcher.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/LocalStack.AwsLocal/CommandDispatcher.cs b/src/LocalStack.AwsLocal/CommandDispatcher.cs index dcfa188..d958c9b 100644 --- a/src/LocalStack.AwsLocal/CommandDispatcher.cs +++ b/src/LocalStack.AwsLocal/CommandDispatcher.cs @@ -116,12 +116,16 @@ public void Run() processSettings.Arguments = builder; - string awsExec = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "aws.cmd" : "aws"; + string[] awsExec = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) + ? new[] {"aws.exe", "aws.cmd"} + : new[] {"aws"}; + FilePath? awsPath = GetAwsPath(awsExec); if (awsPath == null) { - ConsoleContext.Current.WriteLine($"ERROR: Unable to find aws cli"); + ConsoleContext.Current.WriteLine( + $"ERROR: Unable to find aws cli. Executable name: {string.Join(',', awsExec)}"); EnvironmentContext.Current.Exit(1); return; }