mirror of
https://github.com/wahyd4/forego.git
synced 2026-08-23 20:16:59 +10:00
cleanup
This commit is contained in:
@@ -10,7 +10,7 @@ import (
|
||||
)
|
||||
|
||||
func (p *Process) Start() {
|
||||
command := []string{"/bin/bash", p.bashArgument(), fmt.Sprintf("source \"%s\" 2>/dev/null; %s", filepath.Join(p.Root, ".profile"), p.Command)}
|
||||
command := []string{"/bin/bash", p.shellArgument(), fmt.Sprintf("source \"%s\" 2>/dev/null; %s", filepath.Join(p.Root, ".profile"), p.Command)}
|
||||
p.cmd = exec.Command(command[0], command[1:]...)
|
||||
p.cmd.Dir = p.Root
|
||||
p.cmd.Env = p.envAsArray()
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@ func (p *Process) Wait() {
|
||||
p.cmd.Wait()
|
||||
}
|
||||
|
||||
func (p *Process) bashArgument() string {
|
||||
func (p *Process) shellArgument() string {
|
||||
if p.Interactive {
|
||||
return "-ic"
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user