File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -463,7 +463,10 @@ impl Devenv {
463
463
skip( self ) ,
464
464
fields( devenv. user_message = format!( "Building {name} container" ) )
465
465
) ]
466
- pub async fn container_build ( & self , name : & str ) -> Result < String > {
466
+ pub async fn container_build ( & mut self , name : & str ) -> Result < String > {
467
+ // This container name is passed to the flake as an argument and tells the module system
468
+ // that we're 1. building a container 2. which container we're building.
469
+ self . container_name = Some ( name. to_string ( ) ) ;
467
470
self . assemble ( false ) . await ?;
468
471
469
472
let sanitized_name = sanitize_container_name ( name) ;
@@ -483,7 +486,7 @@ impl Devenv {
483
486
}
484
487
485
488
pub async fn container_copy (
486
- & self ,
489
+ & mut self ,
487
490
name : & str ,
488
491
copy_args : & [ String ] ,
489
492
registry : Option < & str > ,
@@ -534,7 +537,7 @@ impl Devenv {
534
537
}
535
538
536
539
pub async fn container_run (
537
- & self ,
540
+ & mut self ,
538
541
name : & str ,
539
542
copy_args : & [ String ] ,
540
543
registry : Option < & str > ,
Original file line number Diff line number Diff line change @@ -108,8 +108,6 @@ async fn main() -> Result<()> {
108
108
name,
109
109
command,
110
110
} => {
111
- devenv. container_name = name. clone ( ) ;
112
-
113
111
// Backwards compatibility for the legacy container flags:
114
112
// `devenv container <name> --copy` is now `devenv container copy <name>`
115
113
// `devenv container <name> --docker-run` is now `devenv container run <name>`
You can’t perform that action at this time.
0 commit comments