beacon-kit icon indicating copy to clipboard operation
beacon-kit copied to clipboard

Add support for $BEACOND_HOME environment variable

Open camembera opened this issue 11 months ago • 1 comments

Add support to beacond for an environment variable to substitute for the --home option. This would likely be in cli/components/client_context.go:

func init() {
	if envHome := os.Getenv("BEACOND_HOME"); envHome != "" {
		DefaultNodeHome = envHome
	} else {
		userHomeDir, err := os.UserHomeDir()
		if err != nil {
			panic(err)
		}
		DefaultNodeHome = filepath.Join(userHomeDir, ".beacond")
	}
}

camembera avatar Feb 04 '25 19:02 camembera

There is --home command flag on the command line. You can override to use your custom home directory if you do not want to use default home directory.

wonderfan avatar Feb 06 '25 00:02 wonderfan