From 2de8262c590c5de28a1761be531ccf8453cd8129 Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Fri, 11 Dec 2020 21:20:18 +0100 Subject: fix verbose output when no command is passed --- snooze.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/snooze.c b/snooze.c index 06329e3..730fb4b 100644 --- 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; -- cgit 1.4.1