Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an option to set config #4103

Merged
merged 1 commit into from
Sep 30, 2020
Merged

Add an option to set config #4103

merged 1 commit into from
Sep 30, 2020

Conversation

arajasek
Copy link
Contributor

A solution for #3674 that seems to work.

Copy link
Contributor

@magik6k magik6k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't seem to actually be used, repo.Config() will still get you the one in lotus dir

func (fsr *fsLockedRepo) Config() (interface{}, error) {
	fsr.configLk.Lock()
	defer fsr.configLk.Unlock()

	return fsr.loadConfigFromDisk()
}

func (fsr *fsLockedRepo) loadConfigFromDisk() (interface{}, error) {
	return config.FromFile(fsr.join(fsConfig), defConfForType(fsr.repoType))
}

@arajasek
Copy link
Contributor Author

@magik6k I'm actually overwriting the config in the lotus dir, so the provided one will be used (and persisted in the lotus dir)

@arajasek
Copy link
Contributor Author

(willing to be told that's terrible, though, it was just the easiest to keysmash)

@arajasek arajasek force-pushed the asr/config branch 2 times, most recently from 8f82642 to acc5a2d Compare September 30, 2020 07:01
@arajasek arajasek merged commit c77ab47 into master Sep 30, 2020
@arajasek arajasek deleted the asr/config branch September 30, 2020 07:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants