# [PATCH 7/7] shell should call setup_path() instead of manually setting up its path

1 messages from 2007-10-25 to 2007-10-25. Participants: Scott R Parish.
Thread: https://gitlist.dev/t/10457

## Scott R Parish, 2007-10-25 03:44

Subject: [PATCH 7/7] shell should call setup_path() instead of manually setting up its path
Message-ID: <1193283892-26167-1-git-send-email-srp@srparish.net>
URL: https://gitlist.dev/e/1193283892-26167-1-git-send-email-srp%40srparish.net

```
Signed-off-by: Scott R Parish <srp@srparish.net>
---
 shell.c |    8 +-------
 1 files changed, 1 insertions(+), 7 deletions(-)

diff --git a/shell.c b/shell.c
index cfe372b..9826109 100644
--- a/shell.c
+++ b/shell.c
@@ -24,17 +24,11 @@ static int do_cvs_cmd(const char *me, char *arg)
 	const char *cvsserver_argv[3] = {
 		"cvsserver", "server", NULL
 	};
-	const char *oldpath = getenv("PATH");
-	struct strbuf newpath = STRBUF_INIT;
 
 	if (!arg || strcmp(arg, "server"))
 		die("git-cvsserver only handles server: %s", arg);
 
-	strbuf_addstr(&newpath, git_exec_path());
-	strbuf_addch(&newpath, ':');
-	strbuf_addstr(&newpath, oldpath);
-
-	setenv("PATH", strbuf_detach(&newpath, NULL), 1);
+	setup_path(NULL);
 
 	return execv_git_cmd(cvsserver_argv);
 }
-- 
gitgui.0.8.4.11176.gd9205-dirty

```
