1
0
mirror of https://github.com/Zygo/bees.git synced 2025-05-17 21:35:45 +02:00

main: ArgList would silently drop the first argument

This fixes a bug where bees tries to process itself as a btrfs filesystem.
This is a species of bug that I only notice *after* pushing to a public
git repo.

Signed-off-by: Zygo Blaxell <bees@furryterror.org>
This commit is contained in:
Zygo Blaxell 2017-01-09 23:39:30 -05:00
parent 4a57c5f499
commit 3138002a1f

View File

@ -555,7 +555,8 @@ BeesTempFile::make_copy(const BeesFileRange &src)
int
bees_main(int argc, const char **argv)
{
vector<string> args(argv, argv + argc);
THROW_CHECK1(invalid_argument, argc, argc >= 1);
vector<string> args(argv + 1, argv + argc - 1);
set_catch_explainer([&](string s) {
BEESLOG("\n\n*** EXCEPTION ***\n\t" << s << "\n***\n");