Giter Club home page Giter Club logo

Comments (4)

thehowl avatar thehowl commented on July 16, 2024

the GNOHOME environment variable?

from gno.

leohhhn avatar leohhhn commented on July 16, 2024

I am talking specifically on the -home parameter, which stores the path to the data dir where the keypairs are stored. Not sure if it coincides with GNOHOME/GNOROOT directly.

I'm reading through gnokey code, it seems that the default is empty, ie from this snippet:

var DefaultBaseOptions = BaseOptions{
	Home:                  "",
	Remote:                "127.0.0.1:26657",
	Quiet:                 false,
	InsecurePasswordStdin: false,
	Config:                "",
}

The way gnokey infers its home parameter is very weird, and frankly I'm not sure how it works.

from gno.

thehowl avatar thehowl commented on July 16, 2024

I'm reading through gnokey code, it seems that the default is empty, ie from this snippet:

So, it's a bit different.

The gnokey binary doesn't actually use client.DefaultBaseOptions (the variable you posted). Instead, refer to cmd/gnokey/main.go: this one shows that the true base config used is the following:

	baseCfg := client.BaseOptions{
		Home:   gnoenv.HomeDir(),
		Remote: "127.0.0.1:26657",
	}

Ie. the default value for -home1 is gnoenv.HomeDir.

This is gnovm/pkg/gnoenv/gnohome.go. In summary: it's GNOHOME, and if it is not set it falls back to ~/.config/gno (on UNIX, on Windows it's AppData IIRC).

What we should recommend users, if they want to change their home directory permanently, is to add export GNOHOME=/path/to/gnohome in their ~/.profile. (In fact, I think we should remove the -home flag altogether, as I don't think it's something a user wants to change with each execution, but I digress)

from gno.

leohhhn avatar leohhhn commented on July 16, 2024

Cool, thanks. I'll close this issue in favor of documenting this more clearly.

from gno.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.