Revert Environment needing to be ShellInterface
This commit is contained in:
parent
1230a3ea07
commit
b6a6e63358
@ -7,7 +7,7 @@ use std::ffi::{OsStr, OsString};
|
||||
use std::path::PathBuf;
|
||||
use std::{env, io};
|
||||
|
||||
pub trait Environment: ShellInterface {
|
||||
pub trait Environment {
|
||||
fn args_os(&self) -> Vec<OsString>;
|
||||
fn var<K>(&self, key: K) -> Result<String, VarError>
|
||||
where
|
||||
|
||||
@ -16,7 +16,7 @@ use crate::logger::{LogLevel, Logger};
|
||||
use crate::os_str_extension::OsStrExtension;
|
||||
use crate::os_string_builder::ReplaceWithOsStr;
|
||||
use crate::server::{RelativeLocalPathAnker, ServerAddress};
|
||||
use crate::shell_interface::{ScpParam, ServerCommand, ShellCommand};
|
||||
use crate::shell_interface::{ScpParam, ServerCommand, ShellCommand, ShellInterface};
|
||||
use clap::{Parser, Subcommand, ValueEnum};
|
||||
use lazy_regex::{lazy_regex, Lazy, Regex};
|
||||
use server::{Server, ServerReference};
|
||||
@ -145,7 +145,7 @@ pub struct Application<E> {
|
||||
|
||||
impl<E> Application<E>
|
||||
where
|
||||
E: Environment,
|
||||
E: Environment + ShellInterface,
|
||||
{
|
||||
pub fn run(&mut self) -> Result<(), String> {
|
||||
let args = Args::try_parse_from(self.environment.args_os()).map_err(|e| e.to_string())?;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user