on main help sign in
refactor: make supervisor internal
bc58f6brobcholz
src/bin/vibebox-supervisor.rs+5
@@ -12,6 +12,11 @@ use tracing_subscriber::prelude::*;
12use vibebox::{config, instance, vm, vm_manager};
12use vibebox::{config, instance, vm, vm_manager};
13
13
14fn main() -> Result<()> {
14fn main() -> Result<()> {
15+ if env::var("VIBEBOX_INTERNAL").as_deref() != Ok("1") {
16+ eprintln!("vibebox-supervisor is internal. Use `vibebox` instead.");
17+ std::process::exit(2);
18+ }
19+
15 init_tracing();
20 init_tracing();
16 color_eyre::install()?;
21 color_eyre::install()?;
17
22
src/vm_manager.rs+1
@@ -135,6 +135,7 @@ fn spawn_manager_process(
135 if raw_args.len() > 1 {
135 if raw_args.len() > 1 {
136 cmd.args(&raw_args[1..]);
136 cmd.args(&raw_args[1..]);
137 }
137 }
138+ cmd.env("VIBEBOX_INTERNAL", "1");
138 if !use_supervisor {
139 if !use_supervisor {
139 cmd.env("VIBEBOX_VM_MANAGER", "1");
140 cmd.env("VIBEBOX_VM_MANAGER", "1");
140 }
141 }