feat: Add support for the --fresh flag again with host environment configuration injection
This commit is contained in:
+7
-3
@@ -29,7 +29,7 @@ const SANDBOX_AGENT: &str = "coyote";
|
||||
#[folder = "assets/sbx-kit/"]
|
||||
struct EmbeddedKit;
|
||||
|
||||
pub fn launch(name: Option<String>) -> Result<()> {
|
||||
pub fn launch(name: Option<String>, fresh: bool) -> Result<()> {
|
||||
ensure_sbx_installed()?;
|
||||
bail_if_nested()?;
|
||||
|
||||
@@ -49,7 +49,9 @@ pub fn launch(name: Option<String>) -> Result<()> {
|
||||
let vault = Vault::init(&bootstrap)?;
|
||||
let registered = sbx_registered_services()?;
|
||||
inject_llm_secret(&config_content, &vault, ®istered)?;
|
||||
inject_mcp_secrets(&vault, ®istered)?;
|
||||
if !fresh {
|
||||
inject_mcp_secrets(&vault, ®istered)?;
|
||||
}
|
||||
|
||||
let discovered = mixins::discover()?;
|
||||
|
||||
@@ -58,7 +60,9 @@ pub fn launch(name: Option<String>) -> Result<()> {
|
||||
} else {
|
||||
mixins::log_discovery(&discovered, false);
|
||||
create_sandbox(&name, &kit_path, &discovered)?;
|
||||
copy_host_files(&name)?;
|
||||
if !fresh {
|
||||
copy_host_files(&name)?;
|
||||
}
|
||||
}
|
||||
|
||||
exec_run(&name, &kit_path)
|
||||
|
||||
Reference in New Issue
Block a user