mirror of
https://codeberg.org/icewind/haze.git
synced 2026-10-01 08:44:09 +02:00
allow exec'ing service containers
This commit is contained in:
parent
fc6cde4161
commit
d138740bbd
7 changed files with 74 additions and 16 deletions
|
|
@ -165,6 +165,7 @@ impl LogService {
|
|||
#[derive(Debug, Clone, Eq, PartialEq)]
|
||||
pub enum ExecService {
|
||||
Db,
|
||||
Service(Service),
|
||||
}
|
||||
|
||||
impl HazeArgs {
|
||||
|
|
@ -232,6 +233,14 @@ impl HazeArgs {
|
|||
args.next();
|
||||
Some(ExecService::Db)
|
||||
}
|
||||
Some(arg) => Service::from_type(&[], arg.as_ref())
|
||||
.into_iter()
|
||||
.filter_map(|services| services.into_iter().next())
|
||||
.next()
|
||||
.map(|service| {
|
||||
args.next();
|
||||
ExecService::Service(service)
|
||||
}),
|
||||
_ => None,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue