mirror of
https://github.com/v2ray/v2ray-core.git
synced 2024-04-21 12:31:52 +00:00
Revert "add arg -confdir"
This commit is contained in:
@@ -4,7 +4,6 @@ import (
|
||||
"io"
|
||||
"os"
|
||||
"os/exec"
|
||||
"strings"
|
||||
|
||||
"v2ray.com/core/common/buf"
|
||||
"v2ray.com/core/common/platform"
|
||||
@@ -36,14 +35,14 @@ func Run(args []string, input io.Reader) (buf.MultiBuffer, error) {
|
||||
if err := cmd.Wait(); err != nil {
|
||||
msg := "failed to execute v2ctl"
|
||||
if errBuffer.Len() > 0 {
|
||||
msg += ": \n" + strings.TrimSpace(errBuffer.MultiBuffer.String())
|
||||
msg += ": " + errBuffer.MultiBuffer.String()
|
||||
}
|
||||
return nil, newError(msg).Base(err)
|
||||
}
|
||||
|
||||
// log stderr, info message
|
||||
if !errBuffer.IsEmpty() {
|
||||
newError("<v2ctl message> \n", strings.TrimSpace(errBuffer.MultiBuffer.String())).AtInfo().WriteToLog()
|
||||
newError("v2ctl > \n", errBuffer.MultiBuffer.String()).AtInfo().WriteToLog()
|
||||
}
|
||||
|
||||
return outBuffer.MultiBuffer, nil
|
||||
|
||||
@@ -83,10 +83,3 @@ func GetConfigurationPath() string {
|
||||
configPath := NewEnvFlag(name).GetValue(getExecutableDir)
|
||||
return filepath.Join(configPath, "config.json")
|
||||
}
|
||||
|
||||
// GetConfDirPath reads "v2ray.location.confdir"
|
||||
func GetConfDirPath() string {
|
||||
const name = "v2ray.location.confdir"
|
||||
configPath := NewEnvFlag(name).GetValue(func() string { return "" })
|
||||
return configPath
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user