Skip to content
Snippets Groups Projects
Verified Commit 186d5b26 authored by Jeremy Soller's avatar Jeremy Soller
Browse files

0.2.19 - redoxer env will behave like env command

parent a02f9e98
No related branches found
Tags 0.2.19
No related merge requests found
......@@ -823,7 +823,7 @@ dependencies = [
[[package]]
name = "redoxer"
version = "0.2.18"
version = "0.2.19"
dependencies = [
"dirs 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
"proc-mounts 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
......
[package]
name = "redoxer"
version = "0.2.18"
version = "0.2.19"
description = "Method for quickly running programs inside of Redox from a KVM capable OS."
license = "MIT"
authors = ["Jeremy Soller <jackpot51@gmail.com>"]
......
......@@ -35,20 +35,8 @@ pub fn command<S: AsRef<ffi::OsStr>>(program: S) -> io::Result<process::Command>
}
fn inner<I: Iterator<Item=String>>(args: I) -> io::Result<()> {
let mut program_opt = None;
let mut arguments = Vec::new();
for arg in args.skip(2) {
if program_opt.is_none() {
program_opt = Some(arg);
} else {
arguments.push(arg);
}
}
//TODO: get user's default shell?
let program = program_opt.unwrap_or("bash".to_string());
command(program)?
.args(arguments)
command("env")?
.args(args)
.status()
.and_then(status_error)?;
......@@ -56,7 +44,7 @@ fn inner<I: Iterator<Item=String>>(args: I) -> io::Result<()> {
}
pub fn main(args: &[String]) {
match inner(args.iter().cloned()) {
match inner(args.iter().cloned().skip(2)) {
Ok(()) => {
process::exit(0);
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment