diff --git a/Cargo.lock b/Cargo.lock index 24909cdf6feb1da06651a66d94fccf34a4c45a66..925cef9505f448a6a62324926f7c09e207c61a58 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -44,6 +44,15 @@ dependencies = [ "memchr", ] +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + [[package]] name = "ansi_term" version = "0.12.1" @@ -213,6 +222,18 @@ dependencies = [ "byte-tools", ] +[[package]] +name = "build_const" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4ae4235e6dac0694637c763029ecea1a2ec9e4e06ec2729bd21ba4d9c863eb7" + +[[package]] +name = "bumpalo" +version = "3.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" + [[package]] name = "byte-tools" version = "0.3.1" @@ -249,6 +270,21 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "chrono" +version = "0.4.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16b0a3d9ed01224b22057780a37bb8c5dbfe1be8ba48678e7bf57ec4b385411f" +dependencies = [ + "iana-time-zone", + "js-sys", + "num-integer", + "num-traits", + "time", + "wasm-bindgen", + "winapi", +] + [[package]] name = "cipher" version = "0.3.0" @@ -273,12 +309,28 @@ dependencies = [ "vec_map", ] +[[package]] +name = "codespan-reporting" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" +dependencies = [ + "termcolor", + "unicode-width", +] + [[package]] name = "constant_time_eq" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" +[[package]] +name = "core-foundation-sys" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" + [[package]] name = "cpufeatures" version = "0.2.5" @@ -288,6 +340,15 @@ dependencies = [ "libc", ] +[[package]] +name = "crc" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d663548de7f5cca343f1e0a48d14dcfb0e9eb4e079ec58883b7251539fa10aeb" +dependencies = [ + "build_const", +] + [[package]] name = "crc32fast" version = "1.3.2" @@ -360,6 +421,50 @@ dependencies = [ "subtle", ] +[[package]] +name = "cxx" +version = "1.0.91" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86d3488e7665a7a483b57e25bdd90d0aeb2bc7608c8d0346acf2ad3f1caf1d62" +dependencies = [ + "cc", + "cxxbridge-flags", + "cxxbridge-macro", + "link-cplusplus", +] + +[[package]] +name = "cxx-build" +version = "1.0.91" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48fcaf066a053a41a81dfb14d57d99738b767febb8b735c3016e469fac5da690" +dependencies = [ + "cc", + "codespan-reporting", + "once_cell", + "proc-macro2", + "quote", + "scratch", + "syn", +] + +[[package]] +name = "cxxbridge-flags" +version = "1.0.91" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2ef98b8b717a829ca5603af80e1f9e2e48013ab227b68ef37872ef84ee479bf" + +[[package]] +name = "cxxbridge-macro" +version = "1.0.91" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "086c685979a698443656e5cf7856c95c642295a38599f12fb1ff76fb28d19892" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "digest" version = "0.8.1" @@ -493,6 +598,18 @@ dependencies = [ "instant", ] +[[package]] +name = "fatfs" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05669f8e7e2d7badc545c513710f0eba09c2fbef683eb859fd79c46c355048e0" +dependencies = [ + "bitflags", + "byteorder", + "chrono", + "log 0.4.17", +] + [[package]] name = "filetime" version = "0.2.17" @@ -511,6 +628,15 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "86d4de0081402f5e88cdac65c8dcdcc73118c1a7a465e2a05f0da05843a8ea33" +[[package]] +name = "fscommon" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "315ce685aca5ddcc5a3e7e436ef47d4a5d0064462849b6f0f628c28140103531" +dependencies = [ + "log 0.4.17", +] + [[package]] name = "fuchsia-cprng" version = "0.1.1" @@ -577,6 +703,18 @@ version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d" +[[package]] +name = "gpt" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dd7365d734a70ac5dd7be791b0c96083852188df015b8c665bb2dadb108a743" +dependencies = [ + "bitflags", + "crc", + "log 0.4.17", + "uuid 0.8.2", +] + [[package]] name = "hermit-abi" version = "0.1.19" @@ -638,6 +776,30 @@ dependencies = [ "webpki-roots", ] +[[package]] +name = "iana-time-zone" +version = "0.1.53" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64c122667b287044802d6ce17ee2ddf13207ed924c712de9a66a5814d5b64765" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "winapi", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca" +dependencies = [ + "cxx", + "cxx-build", +] + [[package]] name = "idna" version = "0.1.5" @@ -667,6 +829,15 @@ dependencies = [ "either", ] +[[package]] +name = "js-sys" +version = "0.3.61" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730" +dependencies = [ + "wasm-bindgen", +] + [[package]] name = "keccak" version = "0.1.2" @@ -715,6 +886,15 @@ dependencies = [ "walkdir", ] +[[package]] +name = "link-cplusplus" +version = "1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecd207c9c713c34f95a097a5b029ac2ce6010530c7b49d7fea24d977dede04f5" +dependencies = [ + "cc", +] + [[package]] name = "log" version = "0.3.9" @@ -783,6 +963,25 @@ dependencies = [ "adler", ] +[[package]] +name = "num-integer" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +dependencies = [ + "autocfg", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +dependencies = [ + "autocfg", +] + [[package]] name = "num_cpus" version = "1.13.1" @@ -808,6 +1007,12 @@ dependencies = [ "memchr", ] +[[package]] +name = "once_cell" +version = "1.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" + [[package]] name = "opaque-debug" version = "0.2.3" @@ -1089,14 +1294,19 @@ dependencies = [ [[package]] name = "redox_installer" -version = "0.2.10" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "735a7bad71e93cda883318cf30f3bcd99830a79c7917e2b3d9da4c6d1d3567e4" +checksum = "e23ecfde5f5853d0e75f4da6d9403e8f1c478abd1417eb2f98ff66a7ff582942" dependencies = [ "arg_parser", "failure", + "fatfs", + "fscommon", + "gpt", "libc", "pkgar", + "pkgar-core", + "pkgar-keys", "rand 0.8.5", "redox_liner", "redox_pkgutils", @@ -1107,6 +1317,7 @@ dependencies = [ "serde_derive", "termion", "toml 0.5.9", + "uuid 0.8.2", ] [[package]] @@ -1211,7 +1422,7 @@ dependencies = [ "seahash", "termion", "time", - "uuid", + "uuid 0.5.1", ] [[package]] @@ -1317,6 +1528,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +[[package]] +name = "scratch" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddccb15bcce173023b3fedd9436f882a0739b8dfb45e4f6b6002bee5929f61b2" + [[package]] name = "sct" version = "0.4.0" @@ -1644,6 +1861,15 @@ dependencies = [ "rand 0.3.23", ] +[[package]] +name = "uuid" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" +dependencies = [ + "getrandom 0.2.7", +] + [[package]] name = "vec_map" version = "0.8.2" @@ -1697,6 +1923,60 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +[[package]] +name = "wasm-bindgen" +version = "0.2.84" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b" +dependencies = [ + "cfg-if 1.0.0", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.84" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9" +dependencies = [ + "bumpalo", + "log 0.4.17", + "once_cell", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.84" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.84" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.84" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" + [[package]] name = "webpki" version = "0.18.1" diff --git a/Cargo.toml b/Cargo.toml index 98913eebb83d6930e491c8ad4a83654ec598f488..f1fe958c1cb5157a10595421ff1dda3f0ef1715a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,7 @@ edition = "2018" [dependencies] dirs = "2.0.2" -redox_installer = "0.2.9" +redox_installer = "0.2.12" redox_syscall = "0.2.11" redoxfs = "0.5.0" tempfile = "3.1.0" diff --git a/src/exec.rs b/src/exec.rs index efc8a57503b71298230e10155907ba6eba2aae61..89a784887da28da4939fc0f3301b9642a2bbde20 100644 --- a/src/exec.rs +++ b/src/exec.rs @@ -1,19 +1,23 @@ -use redoxfs::{archive_at, BLOCK_SIZE, DiskSparse, FileSystem, TreePtr}; -use std::{fs, io}; +use redoxfs::{archive_at, DiskSparse, FileSystem, TreePtr, BLOCK_SIZE}; use std::io::{Seek, Write}; use std::path::{Path, PathBuf}; use std::process::{self, Command}; use std::time::{SystemTime, UNIX_EPOCH}; +use std::{fs, io}; -use crate::{installed, redoxer_dir, status_error, syscall_error, toolchain, target}; use crate::redoxfs::RedoxFs; +use crate::{installed, redoxer_dir, status_error, syscall_error, target, toolchain}; static BASE_TOML: &'static str = include_str!("../res/base.toml"); static GUI_TOML: &'static str = include_str!("../res/gui.toml"); +/// Redoxer is used for testing out apps in redox OS environment. +/// For this reason no live image is required +const INSTALL_LIVE_IMAGE: bool = false; + fn bootloader() -> io::Result<PathBuf> { let bootloader_bin = redoxer_dir().join("bootloader.bin"); - if ! bootloader_bin.is_file() { + if !bootloader_bin.is_file() { eprintln!("redoxer: building bootloader"); let bootloader_dir = redoxer_dir().join("bootloader"); @@ -23,16 +27,17 @@ fn bootloader() -> io::Result<PathBuf> { fs::create_dir_all(&bootloader_dir)?; let mut config = redox_installer::Config::default(); - config.packages.insert("bootloader".to_string(), Default::default()); + config + .packages + .insert("bootloader".to_string(), Default::default()); let cookbook: Option<&str> = None; - redox_installer::install(config, &bootloader_dir, cookbook).map_err(|err| { - io::Error::new( - io::ErrorKind::Other, - format!("{}", err) - ) - })?; + redox_installer::install(config, &bootloader_dir, cookbook, INSTALL_LIVE_IMAGE) + .map_err(|err| io::Error::new(io::ErrorKind::Other, format!("{}", err)))?; - fs::rename(&bootloader_dir.join("boot/bootloader.bios"), &bootloader_bin)?; + fs::rename( + &bootloader_dir.join("boot/bootloader.bios"), + &bootloader_bin, + )?; } Ok(bootloader_bin) } @@ -42,7 +47,7 @@ fn base(bootloader_bin: &Path, gui: bool, fuse: bool) -> io::Result<PathBuf> { let ext = if fuse { "bin" } else { "tar" }; let base_bin = redoxer_dir().join(format!("{}.{}", name, ext)); - if ! base_bin.is_file() { + if !base_bin.is_file() { eprintln!("redoxer: building {}", name); let base_dir = redoxer_dir().join(name); @@ -76,8 +81,9 @@ fn base(bootloader_bin: &Path, gui: bool, fuse: bool) -> io::Result<PathBuf> { None, &bootloader, ctime.as_secs(), - ctime.subsec_nanos() - ).map_err(syscall_error)?; + ctime.subsec_nanos(), + ) + .map_err(syscall_error)?; fs.disk.file.set_len(disk_size)?; } @@ -89,34 +95,27 @@ fn base(bootloader_bin: &Path, gui: bool, fuse: bool) -> io::Result<PathBuf> { None }; - let config: redox_installer::Config = toml::from_str( - if gui { GUI_TOML } else { BASE_TOML } - ).map_err(|err| { - io::Error::new( - io::ErrorKind::Other, - format!("{}", err) - ) - })?; + let config: redox_installer::Config = + toml::from_str(if gui { GUI_TOML } else { BASE_TOML }) + .map_err(|err| io::Error::new(io::ErrorKind::Other, format!("{}", err)))?; let cookbook: Option<&str> = None; - redox_installer::install(config, &base_dir, cookbook).map_err(|err| { - io::Error::new( - io::ErrorKind::Other, - format!("{}", err) - ) - })?; + redox_installer::install(config, &base_dir, cookbook, INSTALL_LIVE_IMAGE) + .map_err(|err| io::Error::new(io::ErrorKind::Other, format!("{}", err)))?; if let Some(mut redoxfs) = redoxfs_opt { redoxfs.unmount()?; } } - if ! fuse { + if !fuse { Command::new("tar") .arg("-c") .arg("-p") - .arg("-f").arg(&base_partial) - .arg("-C").arg(&base_dir) + .arg("-f") + .arg(&base_partial) + .arg("-C") + .arg(&base_dir) .arg(".") .status() .and_then(status_error)?; @@ -127,7 +126,12 @@ fn base(bootloader_bin: &Path, gui: bool, fuse: bool) -> io::Result<PathBuf> { Ok(base_bin) } -fn archive_free_space(disk_path: &Path, folder_path: &Path, bootloader_path: &Path, free_space: u64) -> io::Result<()> { +fn archive_free_space( + disk_path: &Path, + folder_path: &Path, + bootloader_path: &Path, + free_space: u64, +) -> io::Result<()> { let disk = DiskSparse::create(&disk_path, free_space).map_err(syscall_error)?; let bootloader = { @@ -149,8 +153,9 @@ fn archive_free_space(disk_path: &Path, folder_path: &Path, bootloader_path: &Pa None, &bootloader, ctime.as_secs(), - ctime.subsec_nanos() - ).map_err(syscall_error)?; + ctime.subsec_nanos(), + ) + .map_err(syscall_error)?; let end_block = fs .tx(|tx| { @@ -196,20 +201,25 @@ fn archive_free_space(disk_path: &Path, folder_path: &Path, bootloader_path: &Pa Ok(()) } -fn inner(arguments: &[String], folder_opt: Option<String>, gui: bool, output_opt: Option<String>) -> io::Result<i32> { +fn inner( + arguments: &[String], + folder_opt: Option<String>, + gui: bool, + output_opt: Option<String>, +) -> io::Result<i32> { let kvm = Path::new("/dev/kvm").exists(); - if ! installed("qemu-system-x86_64")? { + if !installed("qemu-system-x86_64")? { eprintln!("redoxer: qemu-system-x86 not found, please install before continuing"); process::exit(1); } let fuse = Path::new("/dev/fuse").exists(); if fuse { - if ! installed("fusermount")? { + if !installed("fusermount")? { eprintln!("redoxer: fuse not found, please install before continuing"); process::exit(1); } - } else if ! installed("tar")? { + } else if !installed("tar")? { eprintln!("redoxer: tar not found, please install before continuing"); process::exit(1); } @@ -241,8 +251,10 @@ fn inner(arguments: &[String], folder_opt: Option<String>, gui: bool, output_opt .arg("-x") .arg("-p") .arg("--same-owner") - .arg("-f").arg(&base_bin) - .arg("-C").arg(&redoxer_dir) + .arg("-f") + .arg(&base_bin) + .arg("-C") + .arg(&redoxer_dir) .arg(".") .status() .and_then(status_error)?; @@ -278,11 +290,14 @@ fn inner(arguments: &[String], folder_opt: Option<String>, gui: bool, output_opt let folder_canonical_path = fs::canonicalize(&folder)?; let folder_canonical = folder_canonical_path.to_str().ok_or(io::Error::new( io::ErrorKind::Other, - "folder path is not valid UTF-8" + "folder path is not valid UTF-8", ))?; if arg.starts_with(&folder_canonical) { let arg_replace = arg.replace(folder_canonical, "/root"); - eprintln!("redoxer: replacing '{}' with '{}' in arguments", arg, arg_replace); + eprintln!( + "redoxer: replacing '{}' with '{}' in arguments", + arg, arg_replace + ); redoxerd_config.push_str(&arg_replace); redoxerd_config.push('\n'); continue; @@ -314,20 +329,18 @@ fn inner(arguments: &[String], folder_opt: Option<String>, gui: bool, output_opt } } - if ! fuse { + if !fuse { archive_free_space( &redoxer_bin, &redoxer_dir, &bootloader_bin, - 1024 * 1024 * 1024 + 1024 * 1024 * 1024, )?; } // Set default bootloader configuration if gui { - let mut f = fs::OpenOptions::new() - .write(true) - .open(&redoxer_bin)?; + let mut f = fs::OpenOptions::new().write(true).open(&redoxer_bin)?; // Configuration is stored in the third sector f.seek(io::SeekFrom::Start(512 * 3))?; @@ -346,25 +359,33 @@ fn inner(arguments: &[String], folder_opt: Option<String>, gui: bool, output_opt let redoxer_log = tempdir.path().join("redoxer.log"); let mut command = Command::new("qemu-system-x86_64"); command - .arg("-cpu").arg("max") - .arg("-machine").arg("q35") - .arg("-m").arg("2048") - .arg("-smp").arg("4") - .arg("-serial").arg("mon:stdio") - .arg("-chardev").arg(format!("file,id=log,path={}", redoxer_log.display())) - .arg("-device").arg("isa-debugcon,chardev=log") - .arg("-device").arg("isa-debug-exit") - .arg("-netdev").arg("user,id=net0") - .arg("-device").arg("e1000,netdev=net0") - .arg("-drive").arg(format!("file={},format=raw", redoxer_bin.display())); + .arg("-cpu") + .arg("max") + .arg("-machine") + .arg("q35") + .arg("-m") + .arg("2048") + .arg("-smp") + .arg("4") + .arg("-serial") + .arg("mon:stdio") + .arg("-chardev") + .arg(format!("file,id=log,path={}", redoxer_log.display())) + .arg("-device") + .arg("isa-debugcon,chardev=log") + .arg("-device") + .arg("isa-debug-exit") + .arg("-netdev") + .arg("user,id=net0") + .arg("-device") + .arg("e1000,netdev=net0") + .arg("-drive") + .arg(format!("file={},format=raw", redoxer_bin.display())); if kvm { - command - .arg("-accel").arg("kvm"); + command.arg("-accel").arg("kvm"); } - if ! gui { - command - .arg("-nographic") - .arg("-vga").arg("none"); + if !gui { + command.arg("-nographic").arg("-vga").arg("none"); } let status = command.status()?; @@ -375,11 +396,11 @@ fn inner(arguments: &[String], folder_opt: Option<String>, gui: bool, output_opt Some(51) => { eprintln!("## redoxer (success) ##"); 0 - }, + } Some(53) => { eprintln!("## redoxer (failure) ##"); 1 - }, + } _ => { eprintln!("## redoxer (failure, qemu exit status {:?} ##", status); 2 @@ -423,25 +444,25 @@ pub fn main(args: &[String]) { "-f" | "--folder" if matching => match args.next() { Some(folder) => { folder_opt = Some(folder); - }, + } None => { usage(); - }, + } }, "-g" | "--gui" if matching => { gui = true; - }, + } // TODO: argument for replacing the folder path with /root when found in arguments "-h" | "--help" if matching => { usage(); - }, + } "-o" | "--output" if matching => match args.next() { Some(output) => { output_opt = Some(output); - }, + } None => { usage(); - }, + } }, // TODO: "-p" | "--package" "--" if matching => { @@ -461,7 +482,7 @@ pub fn main(args: &[String]) { match inner(&arguments, folder_opt, gui, output_opt) { Ok(code) => { process::exit(code); - }, + } Err(err) => { eprintln!("redoxer exec: {}", err); process::exit(3);