File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
core/cli/src/commands/binary_context Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,8 @@ bimap = "bimap"
3030flate = " flate"
3131# Valid Rust compression crate name
3232flate2 = " flate2"
33+ # valid rust crate name
34+ writeable = " writeable"
3335# Valid project-specific technical acronym
3436bais = " bais"
3537# Legitimate abbreviation for "Strategy" (e.g. pollingStrat)
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