Skip to content

Commit

Permalink
Normalize line endings in manifests
Browse files Browse the repository at this point in the history
  • Loading branch information
mtdowling committed Sep 23, 2020
1 parent b437510 commit a21f70a
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Logger;
import java.util.stream.Collectors;
import software.amazon.smithy.build.FileManifest;
import software.amazon.smithy.build.PluginContext;
import software.amazon.smithy.build.SmithyBuildPlugin;
Expand Down Expand Up @@ -91,7 +92,9 @@ public void execute(PluginContext context) {
LOGGER.info(String.format("Skipping `%s` manifest because no Smithy sources found", projectionName));
} else {
LOGGER.fine(() -> String.format("Writing `%s` manifest", projectionName));
context.getFileManifest().writeFile("manifest", String.join("\n", names) + "\n");
// Normalize filenames to Unix style.
String manifest = names.stream().map(name -> name.replace("\\", "/")).collect(Collectors.joining("\n"));
context.getFileManifest().writeFile("manifest", manifest + "\n");
}
}

Expand Down

0 comments on commit a21f70a

Please sign in to comment.