Feature/config endpoint updates#5
Conversation
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
[WIP] Address feedback on the /config endpoint update PR
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // Check write permissions | ||
| try { | ||
| await fs.access(Global.Path.config, fs.constants.W_OK) | ||
| } catch (err) { |
There was a problem hiding this comment.
Fix permission check using fs.promises constants
When updating the global config the code checks write permission via await fs.access(Global.Path.config, fs.constants.W_OK), but fs here is imported from fs/promises and does not expose a constants property. That call throws a TypeError before the permission check happens, so every global config update will fail regardless of actual permissions. Import constants from fs (or use import * as fs from 'fs' for the constants) before calling access.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
To use Codex here, create an environment for this repo.
|
@kcrommett I've opened a new pull request, #6, to work on those changes. Once the pull request is ready, I'll request review from you. |
Co-authored-by: kcrommett <523952+kcrommett@users.noreply.github.com>
Co-authored-by: kcrommett <523952+kcrommett@users.noreply.github.com>
Fix fs.constants import in global config permission check
No description provided.