diff --git a/config.go b/config.go index f8d49ee6..88ce14be 100644 --- a/config.go +++ b/config.go @@ -365,18 +365,14 @@ func loadAndValidateConfig(interceptor signal.Interceptor) (*Config, error) { return nil, fmt.Errorf("error parsing flags: %w", err) } - // Show the version and exit if the version flag was specified. + // Show the version and exit if the version flag was specified. This + // applies for both the `--version` and the `-V` flag. appName := filepath.Base(os.Args[0]) appName = strings.TrimSuffix(appName, filepath.Ext(appName)) - if preCfg.ShowVersion { + if preCfg.ShowVersion || preCfg.Lnd.ShowVersion { fmt.Println(appName, "version", RichVersion()) os.Exit(0) } - if preCfg.Lnd.ShowVersion { - fmt.Println(appName, "version", build.Version(), - "commit="+build.Commit) - os.Exit(0) - } // The logging config we use to initialise the sub-logger manager below // depends on whether we're running in remote mode or not. diff --git a/docs/release-notes/release-notes-0.17.0.md b/docs/release-notes/release-notes-0.17.0.md index d9b29cec..6a9bf331 100644 --- a/docs/release-notes/release-notes-0.17.0.md +++ b/docs/release-notes/release-notes-0.17.0.md @@ -35,6 +35,10 @@ ### Technical and Architectural Updates +* [Report litd's own version for `litd + -V`](https://github.com/lightninglabs/lightning-terminal/pull/1337): The `-V` + flag now prints litd's version instead of the integrated lnd version. + ## RPC Updates ## Integrated Binary Updates