Skip to content

Commit f910be9

Browse files
committed
Cap first letter output dir
1 parent a38da5a commit f910be9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Sources/SwiftTemplate/Template.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public struct Template {
9999

100100
public func generate(output: String) throws {
101101
let inputPath = Path(input)
102-
let outputPath = try Path(output).add(context.name)
102+
let outputPath = try Path(output).add(context.name.capitalizedFirstCharacter)
103103
let ignorePath = inputPath.child(Template.ignoreFile)
104104
let ignoreFile = (try? String(contentsOf: ignorePath.url)) ?? ""
105105
let ignore = ignoreFile.split(separator: "\n").map(String.init).filter { !$0.isEmpty }

Tests/SwiftTemplateTests/SwiftTemplateTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ final class SwiftTemplateTests: XCTestCase {
3636
let outputPath = Path(output)
3737

3838
/// check if template was created
39-
XCTAssertEqual(outputPath.children().map(\.name), ["test"])
39+
XCTAssertEqual(outputPath.children().map(\.name), ["Test"])
4040

4141
/// check if test directory was created inside the result project with the right name
4242
let resultPath = outputPath.child("test")

0 commit comments

Comments
 (0)