Closed Conor-Behard333 closed 8 months ago
@Conor-Behard333 can you check if there is a ~/.local/share/code-server/Machine/settings.json
file by running,
cat ~/.local/share/code-server/Machine/settings.json
yeah it is there, it contains { "git.useIntegratedAskPass": false, "github.gitAuthentication": false }
when I change a setting through vscode the settings get added to ~/.local/share/code-server/User/settings.json
@Conor-Behard333 also on a fresh workspace do you have both ~/.local/share/code-server/User/settings.json
and ~/.local/share/code-server/Machine/settings.json
?
I am thinking if one of them is empty, we may probably add a new option to the module with the name settings_scope
that defaults to Machine
to keep the original behavior but allows passing User
to set Settings as the User.
cc: @code-asher if you can provide more context here on what is happening.
on a fresh workspace I have ~/.local/share/code-server/Machine/settings.json but ~/.local/share/code-server/User/settings.json is only created once I make a manual change in vscode (change the theme for example)
So it sounds like your solve would work
A few observations:
User
by default; if you change the tab to Remote
then it will write to Machine
instead.Machine
. For example update.mode
seems to only be valid for User
settings and placing it in Machine
will have no effect. So a scope
option will probably be necessary (or it will need to default to User
).Machine
settings which is probably why you already have it on a fresh workspace. Maybe the module should try to merge settings instead of skipping if the file already exists? Perhaps we can use Node
(since it already comes with code-server) or jq
to do this.Any updates on this?
Hi, I am using the code server module and the settings are not being ported over to the code-server user space Here is the tf module for my template:
After a little investigating into this script: https://github.com/coder/modules/blob/main/code-server/run.sh Looking at the logs of my workspace "⚙️ Creating settings file..." is never outputted which means
is returning true.
Not sure why this is as when I destroy the workspace it should be gone and recreating it still causes this issue.