-
Notifications
You must be signed in to change notification settings - Fork 308
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 command-line processing to update settings #2025
Conversation
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.
The functions need a lot more documentation before I can review it and have confidence that our understandings of what they're supposed to do match.
Forgot to mention that docs for accessing command-line args are at: #1222 (comment) |
9e49fc0
to
9153e75
Compare
291684d
to
92470e6
Compare
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.
The tests don't seem to be doing the right thing — the cfg is updated in-place, so it's just asserting that an object is the same as itself (rather than that it was the same as the previous value).
Signed-off-by: Eric Promislow <[email protected]>
This needs to be tested on each platform in the following configurations: - running a built app (default) - running `npm run dev -- args...` - running e2e tests Signed-off-by: Eric Promislow <[email protected]>
Looks like a cheat to determine if we're running in dev mode, but it's the only possibility that has .../dev.mjs at arg 4. Signed-off-by: Eric Promislow <[email protected]>
Signed-off-by: Eric Promislow <[email protected]>
Add more typing, and reduce the code by returning null on any failure. Signed-off-by: Eric Promislow <[email protected]>
Signed-off-by: Eric Promislow <[email protected]>
- mock `fs.writeFileSync` so that `updateFromCommandLine` can call `settings.save()` and unit tests don't do crazy things to the pref set. Signed-off-by: Eric Promislow <[email protected]>
Signed-off-by: Eric Promislow <[email protected]>
Signed-off-by: Eric Promislow <[email protected]>
Otherwise we're just comparing an object with itself. Signed-off-by: Eric Promislow <[email protected]>
Signed-off-by: Eric Promislow <[email protected]>
Signed-off-by: Eric Promislow <[email protected]>
Signed-off-by: Eric Promislow <[email protected]>
Signed-off-by: Eric Promislow <[email protected]>
Signed-off-by: Eric Promislow <[email protected]>
Signed-off-by: Eric Promislow <[email protected]>
Signed-off-by: Eric Promislow <[email protected]>
Signed-off-by: Eric Promislow <[email protected]>
Signed-off-by: Eric Promislow <[email protected]>
Signed-off-by: Eric Promislow <[email protected]>
ecbeab9
to
9d5fcd4
Compare
Signed-off-by: Eric Promislow <[email protected]>
Signed-off-by: Eric Promislow <[email protected]>
Signed-off-by: Eric Promislow <[email protected]>
Signed-off-by: Eric Promislow <[email protected]>
No description provided.