Radish alpha
H
HardenedBSD Package Manager
Radicle
Git (anonymous pull)
Log in to clone via SSH
Warn about conflicting options in env and cmd line
Vsevolod Stakhov committed 12 years ago
commit be22be83ddb3925af4091da96929a1e2edec5025
parent f9f9beba3bd54b9671d7d7df02e327ad3f6c550d
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 = '=';
	}
}