Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Warn about conflicting options in env and cmd line
Vsevolod Stakhov committed 12 years ago
commit be22be83ddb3925af4091da96929a1e2edec5025
parent f9f9beb
1 file changed +7 -1
modified pkg/main.c
@@ -553,7 +553,13 @@ export_arg_option (char *arg)

	if ((eqp = strchr(arg, '=')) != NULL) {
		*eqp = '\0';
-
		setenv(arg, eqp + 1, 0);
+

+
		if (getenv (arg) != NULL)
+
			warnx("option %s is defined in the environment so command line "
+
					"option is ignored", arg);
+
		else
+
			setenv(arg, eqp + 1, 0);
+

		*eqp = '=';
	}
}