summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index 7f5bcdc..5ee1f9e 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -16,6 +16,7 @@
#![doc = "Rust commands for personal web infrastructure."]
pub(crate) mod archive;
+pub(crate) mod chat;
pub(crate) mod files;
pub(crate) mod images;
pub(crate) mod process;
@@ -50,7 +51,7 @@ struct Cli {
#[derive(Debug, Subcommand)]
enum Action {
- #[command(about = "Run the experimental local chat or initialize its single .env")]
+ #[command(about = "Run experimental local chat or administer its packaged deployment")]
Chat {
#[arg(long, conflicts_with_all = ["reset_owner", "owner_fingerprint"])]
init: bool,
@@ -252,6 +253,9 @@ fn chat(
reset_owner: Option<&str>,
owner_fingerprint: bool,
) -> Result<()> {
+ if project.settings()?.mode == Mode::Production {
+ return chat::admin(project, init, reset_owner, owner_fingerprint);
+ }
let mut command = project.command("cargo")?;
command
.args(["run", "--locked", "-p", "stack-chat-server", "--", "--root"])