1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 12:47:35 +00:00

mount: Do not print usage if executed without any arguments

If 'mount' is executed without any arguments we should print the mount
points and return early not printing the usage statement.

This fixes a regression introduced in commit: 9d48406
This commit is contained in:
Kenneth Myhra 2022-02-02 17:54:59 +01:00 committed by Andreas Kling
parent f1c00bb439
commit 760eeb20da

View file

@ -172,8 +172,10 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
return 0; return 0;
} }
if (source.is_empty() && mountpoint.is_empty()) if (source.is_empty() && mountpoint.is_empty()) {
TRY(print_mounts()); TRY(print_mounts());
return 0;
}
if (!source.is_empty() && !mountpoint.is_empty()) { if (!source.is_empty() && !mountpoint.is_empty()) {
if (fs_type.is_empty()) if (fs_type.is_empty())