Skip to content
This repository was archived by the owner on Oct 31, 2025. It is now read-only.

Commit 98c055c

Browse files
Merge pull request #4 from localstack-dotnet/fix-unable-to-find-aws-cli
fix aws executable path problem for new aws cli versions. fixes #3
2 parents 152dcea + 1158149 commit 98c055c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/LocalStack.AwsLocal/CommandDispatcher.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,16 @@ public void Run()
116116

117117
processSettings.Arguments = builder;
118118

119-
string awsExec = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "aws.cmd" : "aws";
119+
string[] awsExec = RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
120+
? new[] {"aws.exe", "aws.cmd"}
121+
: new[] {"aws"};
122+
120123
FilePath? awsPath = GetAwsPath(awsExec);
121124

122125
if (awsPath == null)
123126
{
124-
ConsoleContext.Current.WriteLine($"ERROR: Unable to find aws cli");
127+
ConsoleContext.Current.WriteLine(
128+
$"ERROR: Unable to find aws cli. Executable name: {string.Join(',', awsExec)}");
125129
EnvironmentContext.Current.Exit(1);
126130
return;
127131
}

0 commit comments

Comments
 (0)