(&self)
| 99 | |
| 100 | impl Command for Register { |
| 101 | fn run(&self) -> CliResult<()> { |
| 102 | // We need async for the HTTP request. Build a one-shot runtime |
| 103 | // rather than depending on the caller being inside tokio. |
| 104 | let rt = tokio::runtime::Runtime::new().map_err(|e| { |
| 105 | CliError::Internal(anyhow::anyhow!("Failed to create async runtime: {e}")) |
| 106 | })?; |
| 107 | |
| 108 | rt.block_on(self.execute()) |
| 109 | } |
| 110 | } |
| 111 | |
| 112 | impl Register { |