Index: compiler-cli/src/beam_compiler.rs
--- compiler-cli/src/beam_compiler.rs.orig
+++ compiler-cli/src/beam_compiler.rs
@@ -60,7 +60,7 @@ impl BeamCompilerInstance {
 
         writeln!(self.stdin.as_ref().expect("stdin present"), "{args}.").map_err(|e| {
             Error::ShellCommand {
-                program: "escript".into(),
+                program: "escript${MODERL_VERSION}".into(),
                 reason: ShellCommandFailureReason::IoError(e.kind()),
             }
         })?;
@@ -75,7 +75,7 @@ impl BeamCompilerInstance {
                 }
                 "gleam-compile-result-error" => {
                     return Err(Error::ShellCommand {
-                        program: "escript".into(),
+                        program: "escript${MODERL_VERSION}".into(),
                         reason: ShellCommandFailureReason::Unknown,
                     });
                 }
@@ -95,7 +95,7 @@ impl BeamCompilerInstance {
 
         // if we get here, stdout got closed before we got an "ok" or "err".
         Err(Error::ShellCommand {
-            program: "escript".into(),
+            program: "escript${MODERL_VERSION}".into(),
             reason: ShellCommandFailureReason::Unknown,
         })
     }
@@ -113,18 +113,18 @@ impl BeamCompilerInstance {
 
         tracing::trace!(escript_path=?escript_path, "spawn_beam_compiler");
 
-        let mut process = std::process::Command::new("escript")
+        let mut process = std::process::Command::new("escript${MODERL_VERSION}")
             .arg(escript_path)
             .stdin(std::process::Stdio::piped())
             .stdout(std::process::Stdio::piped())
             .spawn()
             .map_err(|e| match e.kind() {
                 io::ErrorKind::NotFound => Error::ShellProgramNotFound {
-                    program: "escript".into(),
+                    program: "escript${MODERL_VERSION}".into(),
                     os: get_os(),
                 },
                 other => Error::ShellCommand {
-                    program: "escript".into(),
+                    program: "escript${MODERL_VERSION}".into(),
                     reason: ShellCommandFailureReason::IoError(other),
                 },
             })?;
