summaryrefslogtreecommitdiffstats
path: root/bin/core/imag-grep/src
AgeCommit message (Collapse)Author
2020-04-13Fix: Collapse nested ifminorMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-04-13Fix: Do not write data if output is pipeMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-03-29Implement piping for imag-grepMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-03-08Replace failure with anyhow in complete codebaseMatthias Beyer
This patch was scripted with sed -i 's/use failure::Error/use anyhow::Error/' $(rg "use failure::Error" -l) sed -i 's/use failure::Fallible as /use anyhow::/' $(rg "use failure::Fallible" -l) sed -i 's/failure/anyhow/' $(rg "failure *=" -l) sed -i 's/format_err!/anyhow!/' $(rg "format_err!" -l) sed -i 's/use failure::ResultExt/use anyhow::Context/' $(rg "use failure::ResultExt" -l) sed -i 's/err_msg/anyhow!/' $(rg "use failure::err_msg" -l) sed -i 's/^anyhow\ *=.*$/anyhow = "1"/' $(rg "anyhow * =" -l) sed -i 's/^anyhow_derive.*//' $(rg "anyhow_derive" -l) sed -i 's/extern crate failure/extern crate anyhow/' $(rg "extern crate failure" -l) sed -i 's/.*extern crate anyhow_derive.*//' $(rg "anyhow_derive" -l) Some manual changes were added as well, so this patch was not completely scripted, but mostly. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-01-01Update copyright years to 2015-2020Matthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-12-22Remove error conversion which is not necessary anymore.Matthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26Add id reporting in imag-grepMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26Use resiter::IterInnerOkOrElse instead of libimagerror versionMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26Remove calls to exit() and replace them with error propagation up to main()Matthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26imag-grep: implement ImagApplicationLeon Schuermann
Signed-off-by: Leon Schuermann <leon@is.currently.online>
2019-08-28[No-auto] bin/core/grep: Fix Clippy warningsflip1995
Signed-off-by: flip1995 <hello@philkrones.com> Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-08-28[Auto] bin/core/grep: Fix Clippy warningsflip1995
Signed-off-by: flip1995 <hello@philkrones.com> Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-02-11Remove magic constants in trace_unwrap_exit/map_err_trace_exit_unwrap callsMatthias Beyer
This patch removes the magic constant we used when calling `trace_unwrap_exit()` or `map_err_trace_exit_unwrap()`. We used to call it with `1` as parameter, where the number was the exit code to use. Now the implementation of the function does it automatically (using 1 (one) as exit code). All calls of these functions were fixed. Thanks to vim this was easy. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-02-11Change id reporting API to return ExitCodeMatthias Beyer
Because this API only errors when write!() errors occur, we can return the exit code as an error here. This way the user of the API can immediately exit if there was an IO error, but the API automatically takes care of the right return value, returning (exiting) with zero (0) if there was an "Broken pipe" error and with one (1) otherwise, which is the expected behaviour here. All calls to that API were changed accordingly. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-01-03Update copyright yearsMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-11-11Forbid unsafe code in all cratesMatthias Beyer
2018-11-06Add ID reporting in imag-grepMatthias Beyer
2018-04-13Fix missing countingMatthias Beyer
2018-03-04Use output stream from Runtime::stdout()Matthias Beyer
2018-02-19Fix for broken pipe panicMatthias Beyer
2018-02-18Merge pull request #1224 from matthiasbeyer/git-version-in-versionMatthias Beyer
Git version in version
2018-02-13Use new make_imag_version!() macro for building version stringMatthias Beyer
2018-02-12Rewrite .map_err_trace_exit_unwrap()Matthias Beyer
Necessary because error types changed
2018-02-10Do not print stats when listing files with matchesMatthias Beyer
2018-02-07Update dates in license headerMatthias Beyer
And add missing header in one file
2018-02-01Change calls to into_get_iter() to not take argumentMatthias Beyer
2018-01-12Remove dependency "version"Matthias Beyer
Because the "version" crate is licensed as GPL, which would us require to release imag as GPL, we remove the crate now.
2017-10-12Rewrite .map_err_trace_exit().unwrap() with new helper fnMatthias Beyer
2017-09-15imag-grep: Add new crateMatthias Beyer