Skip to content

Commit 938160e

Browse files
authored
Merge pull request #3161 from dawedawe/fix_3148
Print version in detailed verbosity
2 parents b37d821 + 0f704db commit 938160e

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## [Unreleased]
44

5+
### Changed
6+
7+
* Print version at beginning of execution when detailed verbosity is set. [3148](https://github.com/fsprojects/fantomas/issues/3148)
8+
59
### Fixed
610

711
* Idempotency problem with comments in applications on lambda expressions. [#3128](https://github.com/fsprojects/fantomas/issues/3128)

src/Fantomas/Program.fs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -462,9 +462,15 @@ Join our Discord community: https://discord.gg/Cpq9vf8BJH
462462

463463
let asyncRunner = Async.Parallel >> Async.RunSynchronously
464464

465-
if Option.isSome version then
465+
let versionLog =
466466
let version = CodeFormatter.GetVersion()
467-
stdlog $"Fantomas v%s{version}"
467+
$"Fantomas v%s{version}"
468+
469+
if Option.isNone version then
470+
logGrEqDetailed versionLog
471+
472+
if Option.isSome version then
473+
stdlog versionLog
468474
elif isDaemon then
469475
let daemon =
470476
new FantomasDaemon(Console.OpenStandardOutput(), Console.OpenStandardInput())

0 commit comments

Comments
 (0)