Solved: Debugging a possible upgrade issue from 0.4.1 to 0.5.0 #63
Taitava
started this conversation in
Debugging and testing
Replies: 1 comment 5 replies
-
Hello @Taitava !!!! Now I can confirm with 100% of certainty that everytinhg is OK with
I can confirm that the default option to all Shell Commands (old and new) are I restart Obsdian and again I changed some commands to I have the Sorry again for the false alarm @Taitava . I will pay more attention in the next versions :) I wish you a fantastic Monday :) |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
This discussion started originally in #16 . As the discussion evolved quite long on discussing about a possible upgrade bug, I decided to start a new discussion, because I'm writing quite a long post about testing this possible bug.
Hmm, so the output settings change to Ignore for all commands (except the one you mentioned) without you needing to change them manually. It's odd. Even if this seems to be ok now, I need to test this more in the next few days. While a restart might solve some issues, it should not be needed. The plugin should work after an upgrade without needing Obsidian to be restarted.
I'm going to test this using the following method, and you can test this too, if you want and have time. The idea is just to see can we get the same problem occur again. If we can reproduce it, then it can possibly be fixed.
.obsidian/plugins/obsidian-shellcommands/
.data.json
, name the copy e.g.data-original.json
. Without this copy, your commands might be lost if some errors happen during this test.data.json
in a text editor. It's probably quite long when you have many commands in it, but if you read it with time, you'll understand approximately how the file's structure works for defining each shell command.data.json
:The lines that start with a number in quotes (
"0": {
and"1": {
in this example) are start lines for a shell command. For example, the following part defines a single shell command:Now, for each shell command, you can do these two things:
"ignore_error_codes": [],
remove the trailing comma,
so that the line becomes:"ignore_error_codes": []
Example result for one command:
Example result for a complete file:
When you have done this, the
data.json
file should have a quite similar structure as it had when SC version was0.4.1
. Now you can create a second copy ofdata.json
, name it e.g.data-modified.json
or something. When you open Obsidian next time, SC will automatically add all the fields todata.json
that you just removed. The test idea is, that now you can see does SC set output again to Current file, caret position, or will it correctly use Ignore this time. Now that you havedata-modified.json
, you can repeat the test (if needed) to check again how the new fields' addition goes, just by copyingdata-modified.json
overdata.json
and starting Obsidian.SC always adds missing fields to the config file, so you can remove pretty much whatever field in the file and SC will recreate the field with a default value. But beware, all the special characters like
{
}
[
]
:
,
"
need to be excatly correct. (That's why I mentioned that the last comma,
should be deleted). If there is a small error with these characters, Obsidian will not load the settings file at all, and it does not even tell that there was a problem. If you notice all your commands disappearing in the settings panel (or in command palette), close Obsidian and copy/renamedata-original.json
back todata.json
and start Obsidian again.Beta Was this translation helpful? Give feedback.
All reactions