Revert Environment needing to be ShellInterface

This commit is contained in:
Leonard Steppy 2025-02-07 14:10:13 +01:00
parent 1230a3ea07
commit b6a6e63358
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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())?;