You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I was adding a custom theme, I would normally not need to also create a syntaxes directory, however, the application crashes with the following when trying to rebuild its cache:
$ silicon --build-cache
[error] error finding all the files in a directory: IO error for operation on /home/kenielf/.config/silicon/syntaxes: No such file or directory (os error 2)
Note: this also happens if I was trying to just add custom syntaxes without creating the theme directory
Workaround
Although this can be easily circumvented by simply creating all necessary directories:
mkdir -p ~/.config/silicon/{themes,syntaxes}
However, it might be better to just check first in the code if the directories exist, and if they don't, just skip them altogether.
Fix
Looking into it, the issue seems to be easily resolved by tweaking the add_from_folder function in the impl HighlightingAssets to first check if the directory exists, in the cases where it does not, just skip the building.
I have tested a simple solution and it is working normally on my end:
I also found that I need to run silicon --build-cache with ~/.config/silicon as my working directory, otherwise it looks for themes in whatever else my working directory is.
I also found that I need to run silicon --build-cache with ~/.config/silicon as my working directory, otherwise it looks for themes in whatever else my working directory is.
I have just tested this, and yes - it needs the cwd to contain both the directories for themes and syntaxes - if not, the command fails.
The Issue
If I was adding a custom theme, I would normally not need to also create a
syntaxes
directory, however, the application crashes with the following when trying to rebuild its cache:Note: this also happens if I was trying to just add custom syntaxes without creating the theme directory
Workaround
Although this can be easily circumvented by simply creating all necessary directories:
mkdir -p ~/.config/silicon/{themes,syntaxes}
However, it might be better to just check first in the code if the directories exist, and if they don't, just skip them altogether.
Fix
Looking into it, the issue seems to be easily resolved by tweaking the
add_from_folder
function in theimpl HighlightingAssets
to first check if the directory exists, in the cases where it does not, just skip the building.I have tested a simple solution and it is working normally on my end:
I can submit a PR myself if desired.
The text was updated successfully, but these errors were encountered: