mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
Merge remote-tracking branch 'origin/master' into mktemp
This commit is contained in:
@@ -311,6 +311,15 @@ impl UCommand {
|
||||
self.raw.args(args.as_ref());
|
||||
Box::new(self)
|
||||
}
|
||||
|
||||
pub fn env<K, V>(&mut self, key: K, val: V) -> Box<&mut UCommand> where K: AsRef<OsStr>, V: AsRef<OsStr> {
|
||||
if self.has_run {
|
||||
panic!(ALREADY_RUN);
|
||||
}
|
||||
self.raw.env(key, val);
|
||||
Box::new(self)
|
||||
}
|
||||
|
||||
pub fn run(&mut self) -> CmdResult {
|
||||
self.has_run = true;
|
||||
log_info("run", &self.comm_string);
|
||||
|
||||
Reference in New Issue
Block a user