Improve false interpreter missing CLI arg message

This commit is contained in:
Richard Feldman 2022-05-06 12:22:09 -04:00
parent 6f35d1891a
commit 8849e5cdd1
No known key found for this signature in database
GPG key ID: 7E4127D1E4241798
2 changed files with 4 additions and 2 deletions

View file

@ -489,7 +489,7 @@ fn roc_run(
) -> io::Result<i32> {
use std::os::unix::process::CommandExt;
let mut cmd = match triple.architecture {
match triple.architecture {
Architecture::Wasm32 => {
// If possible, report the generated executable name relative to the current dir.
let generated_filename = binary_path

View file

@ -74,7 +74,9 @@ pub unsafe extern "C" fn roc_memset(dst: *mut c_void, c: i32, n: usize) -> *mut
#[no_mangle]
pub extern "C" fn rust_main() -> i32 {
let arg = env::args().nth(1).unwrap();
let arg = env::args()
.nth(1)
.expect("Please pass a .false file as a command-line argument to the false interpreter!");
let arg = RocStr::from(arg.as_str());
let size = unsafe { roc_main_size() } as usize;