mirror of
https://github.com/lightninglabs/lightning-terminal.git
synced 2026-08-13 12:33:36 +02:00
config: make litd -V report litd's own version
The `-V` flag inherited from lnd printed the integrated lnd version (`build.Version()`) instead of litd's own version, while litd's own `--version` flag already reported the correct value via RichVersion(). Consolidate both flags so either one prints litd's version. Fixes #1091 Signed-off-by: 0xfandom <kashyapshivank01@gmail.com>
This commit is contained in:
parent
4ed4b03324
commit
bcdbe68fa1
2 changed files with 7 additions and 7 deletions
10
config.go
10
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.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue