File tree Expand file tree Collapse file tree
core/cli/src/commands/binary_context Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -149,7 +149,6 @@ impl ContextManager {
149149 let mut new_contexts = cs. contexts . clone ( ) ;
150150 new_contexts. insert ( name. to_string ( ) , config) ;
151151
152- self . context_rw . ensure_iggy_home_exists ( ) . await ?;
153152 self . context_rw
154153 . write_contexts ( new_contexts. clone ( ) )
155154 . await
@@ -289,6 +288,7 @@ impl ContextReaderWriter {
289288 contexts_path. display( )
290289 ) ) ?;
291290
291+ self . ensure_iggy_home_exists ( ) . await ?;
292292 tokio:: fs:: write ( & contexts_path, contents) . await ?;
293293 Self :: set_owner_only_permissions ( & contexts_path) . await ?;
294294 }
@@ -320,6 +320,7 @@ impl ContextReaderWriter {
320320 }
321321
322322 pub async fn write_active_context ( & self , context_name : & str ) -> Result < ( ) > {
323+ self . ensure_iggy_home_exists ( ) . await ?;
323324 let maybe_active_context_path = self . active_context_path ( ) ;
324325
325326 if let Some ( active_context_path) = maybe_active_context_path {
You can’t perform that action at this time.
0 commit comments