-
Notifications
You must be signed in to change notification settings - Fork 94
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
Make exempt accounts file configuration relative to main config file #221
Conversation
@@ -334,6 +334,10 @@ func modifyFilePaths(config *Configuration, fileDir string) { | |||
if len(config.Data.InterestingAccounts) > 0 { | |||
config.Data.InterestingAccounts = path.Join(fileDir, config.Data.InterestingAccounts) | |||
} | |||
|
|||
if len(config.Data.ExemptAccounts) > 0 { | |||
config.Data.ExemptAccounts = path.Join(fileDir, config.Data.ExemptAccounts) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice catch!
configuration/types.go
Outdated
// The path can be absolute or relative to the directory containing the rosetta-cli | ||
// binary. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feels like this comment could be a bit misleading. The DataDirectory
is either absolute or relative to where the binary is being executed instead of the path to the binary
Pull Request Test Coverage Report for Build 6916
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - we will need to mention this in the release changelog given it's a change of behavior
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
Fixes # #215
Motivation
The documentation for exempt_accounts configuration, states that it should specify a path to a file relative to the configuration file. But, the code was actually looking for files relative to the rosetta-cli binary.
Solution
Updated behavior to match the documentation i.e. the exempt accounts file is looked up relative to the main configuration file.
Open questions