This commit is contained in:
Liang Ding 2014-09-05 16:34:34 +08:00
parent 4abad1ec71
commit d9f73b953d
2 changed files with 6 additions and 6 deletions

View File

@ -113,20 +113,20 @@ func pipeCommands(username string, commands ...*exec.Cmd) string {
for i, command := range commands[:len(commands)-1] {
setCmdEnv(command, username)
out, err := command.StdoutPipe()
stdout, err := command.StdoutPipe()
if nil != err {
return err.Error()
}
command.Start()
commands[i+1].Stdin = out
commands[i+1].Stdin = stdout
}
last := commands[len(commands)-1]
setCmdEnv(last, username)
out, err := last.Output()
out, err := last.CombinedOutput()
if err != nil {
return err.Error()
@ -139,7 +139,7 @@ func setCmdEnv(cmd *exec.Cmd, username string) {
userWorkspace := conf.Wide.GetUserWorkspace(username)
cmd.Env = append(cmd.Env,
"TERM=xterm",
"TERM="+os.Getenv("TERM"),
"GOPATH="+userWorkspace,
"GOOS="+runtime.GOOS,
"GOARCH="+runtime.GOARCH,

View File

@ -36,7 +36,7 @@
<div id="dirRMenu" class="menu-r fn-none">
<ul>
<li onclick="tree.newFile();">{{.i18n.create_file}}</li>
<li onclick="tree.newDir();">{{.i18n.create_file}}</li>
<li onclick="tree.newDir();">{{.i18n.create_dir}}</li>
<li onclick="tree.removeIt();">{{.i18n.delete}}</li>
</ul>
</div>