Revert "add arg -confdir"

This commit is contained in:
Kslr
2020-01-02 01:14:36 +08:00
committed by GitHub
parent 1cb43035f1
commit e6f226c64d
6 changed files with 15 additions and 64 deletions
+2 -3
View File
@@ -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
-7
View File
@@ -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
}