mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-01 21:13:09 +00:00
overhaul context
This commit is contained in:
committed by
Aiden McClelland
parent
7b9ce88a16
commit
9fb02c6a1e
@@ -5,13 +5,12 @@ use std::path::Path;
|
||||
use ed25519_dalek::Keypair;
|
||||
use rpc_toolkit::command;
|
||||
|
||||
use crate::context::EitherContext;
|
||||
use crate::context::CliContext;
|
||||
use crate::util::display_none;
|
||||
use crate::{Error, ResultExt};
|
||||
|
||||
#[command(cli_only, blocking, display(display_none))]
|
||||
pub fn init(#[context] ctx: EitherContext) -> Result<(), Error> {
|
||||
let ctx = ctx.as_cli().unwrap();
|
||||
pub fn init(#[context] ctx: CliContext) -> Result<(), Error> {
|
||||
if !ctx.developer_key_path.exists() {
|
||||
let parent = ctx.developer_key_path.parent().unwrap_or(Path::new("/"));
|
||||
if !parent.exists() {
|
||||
|
||||
Reference in New Issue
Block a user