@@ -68,6 +68,11 @@ fn run_floki_from_args(args: &Cli) -> Result<(), Error> {
6868 Ok ( Cli :: clap ( ) . gen_completions_to ( "floki" , * shell, & mut std:: io:: stdout ( ) ) )
6969 }
7070
71+ Some ( Subcommand :: Volume { } ) => {
72+ list_volumes ( & environ, & config) ;
73+ Ok ( ( ) )
74+ }
75+
7176 // Launch an interactive floki shell (the default)
7277 None => {
7378 let inner_command = config. shell . inner_shell ( ) . to_string ( ) ;
@@ -86,6 +91,17 @@ fn run_floki_container(
8691 interpret:: run_container ( & environ, & config, & inner_command)
8792}
8893
94+ /// Print the volumes used in the current configuration
95+ fn list_volumes ( environ : & environment:: Environment , config : & FlokiConfig ) {
96+ println ! ( "{:20} {:20} {}" , "NAME" , "MOUNT" , "HOSTPATH" ) ;
97+ for ( name, volume) in config. volumes . iter ( ) {
98+ let hostpath =
99+ volumes:: cache_path ( & environ. floki_workspace , & environ. config_file , name, volume) ;
100+ let mount = & volume. mount ;
101+ println ! ( "{:20} {:20} {}" , name, mount. to_string_lossy( ) , hostpath. to_string_lossy( ) ) ;
102+ }
103+ }
104+
89105/// Configure the logger
90106fn configure_logging ( verbosity : u8 ) -> Result < ( ) , Error > {
91107 let level = match verbosity {
0 commit comments