mirror of
https://github.com/janet-lang/janet
synced 2024-11-20 15:44:49 +00:00
Merge pull request #402 from andrewchambers/linelockfiles
Format lock files for nicer diffs.
This commit is contained in:
commit
17cb0c1aee
11
jpm
11
jpm
@ -758,8 +758,15 @@ int main(int argc, const char **argv) {
|
||||
(unless made-progress
|
||||
(error (string/format "could not resolve package order for: %j"
|
||||
(filter (complement resolved) (map |($ :repo) packages))))))
|
||||
# Write to file
|
||||
(with [f (file/open filename :w)] (with-dyns [:out f] (printf "%j" ordered-packages))))
|
||||
# Write to file, manual format for better diffs.
|
||||
(with [f (file/open filename :w)]
|
||||
(with-dyns [:out f]
|
||||
(prin "@[")
|
||||
(eachk i ordered-packages
|
||||
(unless (zero? i)
|
||||
(prin "\n "))
|
||||
(prinf "%j" (ordered-packages i)))
|
||||
(print "]"))))
|
||||
|
||||
(defn- load-lockfile
|
||||
[&opt filename]
|
||||
|
Loading…
Reference in New Issue
Block a user