cli/self: `--nid` deprecation warning to stderr
Printing the warning to standard output breaks scripts. Instead, print to standard error.
This commit is contained in:
parent
3fb04623a4
commit
8558cc2233
|
|
@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
## Deprecations
|
||||
|
||||
- The option `rad self --nid` was deprecated in favor of `rad status --only nid`
|
||||
## New Features
|
||||
|
||||
- `rad clone` now supports the flag `--bare` which works analoguously to
|
||||
|
|
|
|||
|
|
@ -26,10 +26,14 @@ did:key:z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi
|
|||
|
||||
```
|
||||
$ rad self --nid
|
||||
! Warning: The option `--nid` is deprecated, please use `rad node status --only nid` instead.
|
||||
z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi
|
||||
```
|
||||
|
||||
``` (stderr)
|
||||
$ rad self --nid
|
||||
! Deprecated: The command/option `rad self --nid` is deprecated and will be removed. Please use `rad node status --only nid` instead.
|
||||
```
|
||||
|
||||
```
|
||||
$ rad self --ssh-key
|
||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHahWSBEpuT1ESZbynOmBNkLBSnR32Ar4woZqSV2YNH1
|
||||
|
|
|
|||
|
|
@ -100,9 +100,7 @@ pub fn run(options: Options, ctx: impl term::Context) -> anyhow::Result<()> {
|
|||
term::print(profile.config.alias());
|
||||
}
|
||||
Show::NodeId => {
|
||||
term::warning(
|
||||
"The option `--nid` is deprecated, please use `rad node status --only nid` instead.",
|
||||
);
|
||||
crate::warning::deprecated("rad self --nid", "rad node status --only nid");
|
||||
term::print(
|
||||
Node::new(profile.socket())
|
||||
.nid()
|
||||
|
|
|
|||
Loading…
Reference in New Issue