Skip to content

Commit 6efe014

Browse files
committed
issue(#402) Add support for solutions migrated to slnx
1 parent 2e59f08 commit 6efe014

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Amazon.Common.DotNetCli.Tools/Commands/BasePushDockerImageCommand.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ public static DockerDetails InspectDockerFile(IToolLogger logger, string project
409409
{
410410
var noSpaceLine = line.Replace(" ", "");
411411

412-
if (noSpaceLine.StartsWith("COPY") && (noSpaceLine.EndsWith(".sln./") || (projectFilename != null && noSpaceLine.Contains("/" + projectFilename))))
412+
if (noSpaceLine.StartsWith("COPY") && (noSpaceLine.EndsWith(".sln./") || noSpaceLine.EndsWith(".slnx./") || (projectFilename != null && noSpaceLine.Contains("/" + projectFilename))))
413413
{
414414
details.BuildFromSolutionDirectory = true;
415415
logger?.WriteLine("... Determined that docker build needs to be run from solution folder.");
@@ -437,6 +437,9 @@ public static string DetermineSolutionDirectory(string projectLocation)
437437
{
438438
if (Directory.GetFiles(projectLocation, "*.sln", SearchOption.TopDirectoryOnly).Length != 0)
439439
return projectLocation;
440+
441+
if (Directory.GetFiles(projectLocation, "*.slnx", SearchOption.TopDirectoryOnly).Length != 0)
442+
return projectLocation;
440443

441444
var parent = Directory.GetParent(projectLocation)?.FullName;
442445
if (parent == null)

0 commit comments

Comments
 (0)