aboutsummaryrefslogtreecommitdiffstats
path: root/src/run
diff options
context:
space:
mode:
Diffstat (limited to 'src/run')
-rw-r--r--src/run/builtin.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/run/builtin.rs b/src/run/builtin.rs
index 90c44a9..b791861 100644
--- a/src/run/builtin.rs
+++ b/src/run/builtin.rs
@@ -114,8 +114,7 @@ impl Builtin for Sink {
_stdout: &mut dyn Write,
) -> Result {
let Some(path) = args.get(0) else {
- // TODO exit code
- return Ok(());
+ return Err(Error::Exit(1));
};
let path = PathBuf::from(OsStr::from_bytes(path));
let mut file = OpenOptions::new()
@@ -146,8 +145,7 @@ impl Builtin for from {
stdout: &mut dyn Write,
) -> Result {
let Some(path) = args.get(0) else {
- // TODO exit code
- return Ok(());
+ return Err(Error::Exit(1));
};
let path = PathBuf::from(OsStr::from_bytes(path));
let mut file = OpenOptions::new().read(true).open(path)?;