atharvalade opened a new issue, #3030:
URL: https://github.com/apache/iggy/issues/3030

   
   The `context use` command writes to `~/.iggy/.active_context` via 
`tokio::fs::write`, which fails if the `~/.iggy/` directory hasn't been created 
yet.
   
   The recently added `context create` command handles this by calling 
`ensure_iggy_home_exists()` before writing, but the existing 
`write_active_context()` and `write_contexts()` methods in 
`ContextReaderWriter` don't do this.
   
   Steps to reproduce:
   
   1. Remove `~/.iggy/` if it exists
   2. Run `iggy context use default`
   3. Observe a write error because the directory is missing
   
   Fix would be to call `ensure_iggy_home_exists()` inside 
`write_active_context()` and `write_contexts()` so all write paths handle a 
fresh system.
   
   Please wait before #2998 merges to work on this.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to