Show More
@@ -59,15 +59,15 b' fn main() {' | |||||
59 |
|
59 | |||
60 | // TODO: add loop detection by $CHGINTERNALMARK |
|
60 | // TODO: add loop detection by $CHGINTERNALMARK | |
61 |
|
61 | |||
62 | let code = run().unwrap_or_else(|err| { |
|
62 | let umask = unsafe { procutil::get_umask() }; // not thread safe | |
|
63 | let code = run(umask).unwrap_or_else(|err| { | |||
63 | writeln!(io::stderr(), "chg: abort: {}", err).unwrap_or(()); |
|
64 | writeln!(io::stderr(), "chg: abort: {}", err).unwrap_or(()); | |
64 | 255 |
|
65 | 255 | |
65 | }); |
|
66 | }); | |
66 | process::exit(code); |
|
67 | process::exit(code); | |
67 | } |
|
68 | } | |
68 |
|
69 | |||
69 | fn run() -> io::Result<i32> { |
|
70 | fn run(umask: u32) -> io::Result<i32> { | |
70 | let umask = unsafe { procutil::get_umask() }; // not thread safe |
|
|||
71 | let mut loc = Locator::prepare_from_env()?; |
|
71 | let mut loc = Locator::prepare_from_env()?; | |
72 | loc.set_early_args(locator::collect_early_args(env::args_os().skip(1))); |
|
72 | loc.set_early_args(locator::collect_early_args(env::args_os().skip(1))); | |
73 | let handler = ChgUiHandler::new(); |
|
73 | let handler = ChgUiHandler::new(); |
General Comments 0
You need to be logged in to leave comments.
Login now