Skip to content

Commit

Permalink
fixed bug where file name coincidence could lead to write unwanted fi…
Browse files Browse the repository at this point in the history
…le, fixed incorrect format on README file
  • Loading branch information
jjotaum committed Jul 13, 2021
1 parent 7e7dc57 commit e3fe07d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ OPTIONS:
file.
iOS, macOS, swiftUI (default: iOS)
-h, --help Show help information.
```

### Installation

Expand Down
2 changes: 1 addition & 1 deletion Sources/ChromaLibrary/Chroma.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ extension Chroma {

private func generate() {
let folder = Folder.root
let file = folder.files.recursive.first(where: { $0.nameExcludingExtension == name }) ?? File(named: name, at: folder)
let file = folder.files.recursive.first(where: { $0.name == "\(name).swift" }) ?? File(named: name, at: folder)
let body = folder.colorDefinitions(for: platform).sorted().joined(separator: "\n\n")
let content = platform.fileContent(header: header, body: body)
do {
Expand Down

0 comments on commit e3fe07d

Please sign in to comment.