aboutsummaryrefslogtreecommitdiffstats
path: root/src/redo-ifchange.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/redo-ifchange.c')
-rw-r--r--src/redo-ifchange.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/redo-ifchange.c b/src/redo-ifchange.c
index e95e92e..75bd984 100644
--- a/src/redo-ifchange.c
+++ b/src/redo-ifchange.c
@@ -13,6 +13,12 @@
#include "dbg.h"
int main(int argc, char *argv[]) {
+ if (!environment_sane()) {
+ fprintf(stderr, "redo: environment variables are missing, \
+ please use %s only in do scripts.\n", argv[0]);
+ exit(1);
+ }
+
for (int i = 1; i < argc; ++i) {
/*debug("Testing if %s is up-to-date ...\n", argv[i]);*/
if (has_changed(argv[i], 'c', false)) {
@@ -23,4 +29,6 @@ int main(int argc, char *argv[]) {
}
add_dep(argv[i], NULL, 'c');
}
+
+ return 0;
}