Skip to content

Commit

Permalink
Quote package name passed to nvchecker (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
berberman authored Sep 1, 2023
1 parent 4479737 commit 2bcf73d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
12 changes: 6 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion nvfetcher_example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ src.container = "library/alpine"
src.include_regex = "3\\..*"
fetch.docker = "library/alpine"

[submodule-example]
# To demonstrate package key containing `.`
["submodule.example"]
src.git = "https://github.com/githubtraining/example-dependency"
fetch.git = "https://github.com/githubtraining/example-dependency"
git.fetchSubmodules = true
4 changes: 2 additions & 2 deletions src/NvFetcher/Nvchecker.hs
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,10 @@ genNvConfig pkg options mKeyfile versionSource =
genOptions options
)
where
key =: x = tell [key <> " = " <> T.pack (show $ T.unpack x)]
key =: x = tell [key <> " = " <> quote x]
key =:? (Just x) = key =: x
_ =:? _ = pure ()
table t m = tell ["[" <> t <> "]"] >> m >> tell [""]
table t m = tell ["[" <> quote t <> "]"] >> m >> tell [""]
genVersionSource = \case
GitHubRelease {..} -> do
"source" =: "github"
Expand Down

0 comments on commit 2bcf73d

Please sign in to comment.