mirror of
https://github.com/robcholz/vibebox.git
synced 2026-10-12 01:18:41 +02:00
refactor: make supervisor internal
This commit is contained in:
1 parent
8e0439cd75
commit
bc58f6bbbb
2 files changed
+6
No files matched your search
@@ -12,6 +12,11 @@ use tracing_subscriber::prelude::*;
|
|||||||
use vibebox::{config, instance, vm, vm_manager};
|
use vibebox::{config, instance, vm, vm_manager};
|
||||||
|
|
||||||
fn main() -> Result<()> {
|
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();
|
init_tracing();
|
||||||
color_eyre::install()?;
|
color_eyre::install()?;
|
||||||
|
|
||||||
|
|||||||
@@ -135,6 +135,7 @@ fn spawn_manager_process(
|
|||||||
if raw_args.len() > 1 {
|
if raw_args.len() > 1 {
|
||||||
cmd.args(&raw_args[1..]);
|
cmd.args(&raw_args[1..]);
|
||||||
}
|
}
|
||||||
|
cmd.env("VIBEBOX_INTERNAL", "1");
|
||||||
if !use_supervisor {
|
if !use_supervisor {
|
||||||
cmd.env("VIBEBOX_VM_MANAGER", "1");
|
cmd.env("VIBEBOX_VM_MANAGER", "1");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user