I am using VScode on both my Macbook and my PC and my settings are synced. I use coderunner to run my python programs. My problem is that in my settings.json, the command I use to run my program on my mac is different to the one I need to use on my PC. The specific command I use is
clear && python3 -u
. Since Vscode runs my code through the terminal, I have it clear every time I run it. When I am on my PC instead of my Mac, the command does not work. I do not want to have to change the command in the settings every time I switch beween computers. This is what the settings look like.
I did try switching it at first to just py
in my PC settings, since that is the command that the PC command prompt needs to activate python. But even that gave me an error and it changed the settings on my macbook. Is there something in the settings I can add or change to unsync it? Or do I just deal with it? I dont want to unsync everything else if possible.
2
Answers
You put forward a solution in the comment.
I think I can add it appropriately. In the detailed description of Settings Sync, we can also use
ignoreUploadFiles
orignoreUploadFolders
to disable the specified file:As you already found out, you can exclude specific settings from syncing by defining this in your JSON config:
This will prevent your defined executors for ALL languages from being synced, though. If you want to keep syncing all the other executors, you might want to change your executor command instead so that it is platform agnostic.
You can check if you’re running on Mac or Linux using the
uname
command. A single line command chain to run a different command for each platform would look like this:So in your case you probably could define something like this to make the executor command work on both your platforms: