Skip to content

Commit 8cf3cde

Browse files
committed
add copying chat binary in appimage install
1 parent ff206a3 commit 8cf3cde

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

crates/fig_desktop/src/install.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -615,6 +615,7 @@ async fn install_autostart_entry(
615615
#[cfg(target_os = "linux")]
616616
async fn install_appimage_binaries(ctx: &Context) -> anyhow::Result<()> {
617617
use fig_util::consts::{
618+
CHAT_BINARY_NAME,
618619
CLI_BINARY_NAME,
619620
PTY_BINARY_NAME,
620621
};
@@ -626,7 +627,7 @@ async fn install_appimage_binaries(ctx: &Context) -> anyhow::Result<()> {
626627
}
627628

628629
// Extract and install the CLI + PTY under home local bin, if required.
629-
for binary_name in &[CLI_BINARY_NAME, PTY_BINARY_NAME] {
630+
for binary_name in &[CLI_BINARY_NAME, PTY_BINARY_NAME, CHAT_BINARY_NAME] {
630631
let local_binary_path = home_local_bin_ctx(ctx)?.join(binary_name);
631632
if local_binary_path.exists() {
632633
let output = Command::new(&local_binary_path).arg("--version").output().await.ok();
@@ -887,6 +888,7 @@ mod test {
887888

888889
use fig_util::directories::home_local_bin_ctx;
889890
use fig_util::{
891+
CHAT_BINARY_NAME,
890892
CLI_BINARY_NAME,
891893
PTY_BINARY_NAME,
892894
};
@@ -901,7 +903,7 @@ mod test {
901903
if !fs.exists(&destination) {
902904
fs.create_dir_all(&destination).await.unwrap();
903905
}
904-
for binary_name in &[CLI_BINARY_NAME, PTY_BINARY_NAME] {
906+
for binary_name in &[CLI_BINARY_NAME, PTY_BINARY_NAME, CHAT_BINARY_NAME] {
905907
let path = destination.as_ref().join(binary_name);
906908
fs.write(
907909
&path,
@@ -918,7 +920,7 @@ echo "{binary_name} {version}"
918920
}
919921

920922
async fn assert_binaries_installed(ctx: &Context, expected_version: &str) {
921-
for binary_name in &[CLI_BINARY_NAME, PTY_BINARY_NAME] {
923+
for binary_name in &[CLI_BINARY_NAME, PTY_BINARY_NAME, CHAT_BINARY_NAME] {
922924
let binary_path = home_local_bin_ctx(ctx).unwrap().join(binary_name);
923925
let stdout = Command::new(ctx.fs().chroot_path(binary_path))
924926
.output()

0 commit comments

Comments
 (0)