Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replaceCodeSettings in the syncLocalSettings.json file doens't work for "http.proxy" #753

Closed
JoelKle opened this issue Jan 19, 2019 · 4 comments

Comments

@JoelKle
Copy link

JoelKle commented Jan 19, 2019

🐛 Describe the bug
I have the exact szenario you descriped on your blogpost:
http://shanalikhan.github.io/2016/07/31/Visual-Studio-code-sync-setting-edit-manually.html

I have to use a proxy on my company computer but not on my private computer.
So I set in my VSCode Settings (settings.json) my company proxy:
"http.proxy": "http://company-proxy.int.de:8080",

And to overwrite on my private computer this setting my syncLocalSettings.json file looks like this (token removed):
{ "ignoreUploadFiles": [ "projects.json", "projects_cache_vscode.json", "projects_cache_git.json", "projects_cache_svn.json", "gpm_projects.json", "gpm-recentItems.json" ], "ignoreUploadFolders": [ "workspaceStorage" ], "ignoreExtensions": [], "replaceCodeSettings": { "http.proxy": "" }, "gistDescription": "Visual Studio Code Settings Sync Gist", "version": 324, "token": "", "downloadPublicGist": false, "supportedFileExtensions": [ "json", "code-snippets" ], "openTokenLink": true, "disableUpdateMessage": false, "lastUpload": "2019-01-19T18:26:44.963Z", "lastDownload": "2019-01-18T09:53:25.848Z", "githubEnterpriseUrl": null, "askGistName": false, "customFiles": {}, "hostName": null }

But it doens't work. The http.proxy varaible will not be overwritten and set to null.
I can see in the debug console, that he try to reach my company proxy if I use it on my private computer.

Why is the http.proxy variable not overwritten on my private computer?

🌴 Visual Studio Code Version : [ 1.30.2 ]
🌴 Code Settings Sync Version : [ 3.2.4 ]
🌴 Standard or Insiders : [ Standart ]
🌴 Operating System : [ private = Ubuntu 18.04; company = Win10 ]
🌴 Occurs On: [Upload and Download ]
🌴 Proxy Enabled: [ Yes and No ]

📰 To Reproduce
Steps to reproduce the behavior:

  1. Set http.proxy variable on computer 1 in settings.json
  2. Upload settings from computer 1
  3. Set replaceCodeSettings => http.proxy variable to null in syncLocalSettings.json on computer 2
  4. Download settings on computer 2
  5. Try to upload settings on computer 2
  6. Download / Upload on computer 2 doens't work because he try to use the proxy

💪 Expected behavior
http.proxy variable is set to null on my private computer (where I overwrite the variable)

@shanalikhan
Copy link
Owner

its replaced.
see details here
https://github.com/shanalikhan/code-settings-sync/wiki/Sync-Pragmas

thanks for letting me know, i will update the blog post.

@shanalikhan shanalikhan added this to the v3.2.5 milestone Jan 28, 2019
@JoelKle
Copy link
Author

JoelKle commented Jan 29, 2019

Thank you. It worked.

@JoelKle JoelKle closed this as completed Jan 29, 2019
@shanalikhan shanalikhan removed this from the v3.2.5 milestone Jan 29, 2019
@arnauldvm
Copy link

its replaced.
see details here
https://github.com/shanalikhan/code-settings-sync/wiki/Sync-Pragmas

thanks for letting me know, i will update the blog post.

Wow, at last I found a solution for a months long problem I had.
Thank you for that!
It really deserves being clearly mentioned in the documentation...

@rrileyca
Copy link

rrileyca commented May 24, 2019

I am so confused by the documentation here: https://github.com/shanalikhan/code-settings-sync/wiki/Sync-Pragmas

Can you give a concrete example? Do you put the // @sync string in settings.json or in syncLocalSettings.json? Where do you put it? This does not seem to work for me.

Edit1: Further, in the link above, there is a line that says you can get more info but leads you to irrelevant information
"hostName must be set in syncLocalSettings.json. More info here"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants