mirror of
https://github.com/robcholz/vibebox.git
synced 2026-04-01 00:10:15 +02:00
refactor: make supervisor internal
This commit is contained in:
@@ -12,6 +12,11 @@ use tracing_subscriber::prelude::*;
|
||||
use vibebox::{config, instance, vm, vm_manager};
|
||||
|
||||
fn main() -> Result<()> {
|
||||
if env::var("VIBEBOX_INTERNAL").as_deref() != Ok("1") {
|
||||
eprintln!("vibebox-supervisor is internal. Use `vibebox` instead.");
|
||||
std::process::exit(2);
|
||||
}
|
||||
|
||||
init_tracing();
|
||||
color_eyre::install()?;
|
||||
|
||||
|
||||
@@ -135,6 +135,7 @@ fn spawn_manager_process(
|
||||
if raw_args.len() > 1 {
|
||||
cmd.args(&raw_args[1..]);
|
||||
}
|
||||
cmd.env("VIBEBOX_INTERNAL", "1");
|
||||
if !use_supervisor {
|
||||
cmd.env("VIBEBOX_VM_MANAGER", "1");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user