Skip to content

Commit

Permalink
watcher/cli: cleanup to be the 100line program it is
Browse files Browse the repository at this point in the history
  • Loading branch information
Will committed Nov 20, 2023
1 parent b63b64d commit 240f94e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/wtr/watcher/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ struct Args {
optional<char const*> help;
optional<fs::path> path;
optional<nanoseconds> time;

static auto try_parse(int argc, char const* const* const argv) -> optional<Args>
{
auto argis = [&](auto const i, char const* a)
Expand Down Expand Up @@ -112,7 +113,7 @@ int main(int const argc, char const** const argv)
return ! args.has_value() ? (cerr << Args::usage, 1)
: args->help.has_value() ? (cout << Args::usage, 0)
: ! args->path.has_value() ? (cerr << Args::usage, 1)
: watch_for(args->path.value(), args->time);
: ! watch_for(args->path.value(), args->time);
};

// clang-format on

0 comments on commit 240f94e

Please sign in to comment.