error: ```Malformed JSON /home/tyler/.config/graph...
# report-bugs
t
error:
Copy code
Malformed JSON /home/tyler/.config/graphite/user_config
when: • any non-passthrough
gt
command version: • i'm on
1.7.20
how do i debug/fix? 🤔
p
(If applicable) To help us repro, please send the following if you haven't already: - PR links, screenshots, and/or debug output if applicable - Repro steps - Does this happen consistently? Just to you or others on your team also? - Is this a regression? Is the problem new? - If you're having an issue with the CLI, please send us debug logs using
gt feedback --with-debug-context <any message>
t
been using graphite all day and didn't mess with my config. not sure what's wrong.
a
i can't help with what might have broken it in the first place, but have you tried opening the file to see if it is actually valid json?
t
there's nothing in the file.
a
try these 2 commands? it might just be forgetting it could be empty?
Copy code
mkdir -p ~/.config/graphite
echo '{}' >> ~/.config/graphite/user_config
t
thanks - yeah, putting
{}
in that file is sufficient to unblock. just not sure what's actually supposed to be in that file or why it broke.
a
if you type
gt config
, it's an interactive way to configure that file. i think it also should contain your auth token?
this is mine for example:
Copy code
{
  "branchPrefix": "allys/",
  "branchDate": false,
  "skipApplyingPrefixToNonGeneratedBranchNames": false,
  "allowSlashesInGeneratedBranchNames": true,
  "allowUpperCaseInGeneratedBranchNames": false,
  "authToken": "<redacted>",
  "gtiConfigs": [
    {
      "key": "gti.install-uuid",
      "value": "<redacted>"
    },
    {
      "key": "gti.submit-with-web",
      "value": "\"web\""
    },
    {
      "key": "gti.new-branch-name",
      "value": "\"manual\""
    },
    {
      "key": "gti.branch-display-choice",
      "value": "\"branch-name\""
    }
  ],
  "updateAutomatically": true
}
t
weird. wonder why mine suddenly poofed.
🤔 1