]> git.netwichtig.de Git - user/henk/code/snooze.git/commitdiff
fix verbose output when no command is passed
authorLeah Neukirchen <leah@vuxu.org>
Fri, 11 Dec 2020 20:20:18 +0000 (21:20 +0100)
committerLeah Neukirchen <leah@vuxu.org>
Fri, 11 Dec 2020 20:20:18 +0000 (21:20 +0100)
snooze.c

index 06329e389d6afbe858de2ef793b952fa764653e0..730fb4bb9365b4eeddbb9bd59273a302fc8c0922 100644 (file)
--- a/snooze.c
+++ b/snooze.c
@@ -392,16 +392,16 @@ main(int argc, char *argv[])
                }
        }
 
-       // no command to run, the outside script can go on
-       if (argc == optind)
-               return 0;
-
        if (vflag) {
                now = time(0);
                tm = localtime(&now);
                printf("Starting execution at %s\n", isotime(tm));
        }
 
+       // no command to run, the outside script can go on
+       if (argc == optind)
+               return 0;
+
        execvp(argv[optind], argv+optind);
        perror("execvp");
        return 255;