We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent8193a11 commitc1183afCopy full SHA for c1183af
src/remote.ts
@@ -277,7 +277,13 @@ export class Remote {
277
constparsed=jsonc.parse(settingsContent)
278
parsed["remote.SSH.remotePlatform"]=remotePlatforms
279
constedits=jsonc.modify(settingsContent,["remote.SSH.remotePlatform"],remotePlatforms,{})
280
-awaitfs.writeFile(this.storage.getUserSettingsPath(),jsonc.applyEdits(settingsContent,edits))
+try{
281
+awaitfs.writeFile(this.storage.getUserSettingsPath(),jsonc.applyEdits(settingsContent,edits))
282
+}catch(ex){
283
+// The user will just be prompted instead, which is fine!
284
+// If a user's settings.json is read-only, then we can't write to it.
285
+// This is the case when using home-manager on NixOS.
286
+}
287
288
constworkspaceUpdate=newvscode.EventEmitter<Workspace>()
289
constwatchURL=newURL(`${this.storage.getURL()}/api/v2/workspaces/${this.storage.workspace.id}/watch`)