What is the canonical way to let an extension know that it's running in Gitpod?

I’m working on an VS Code extension and I would like to customize certain feature to behave differently for VS Code and Gitpod.

What is the canonical way to know whether it’s running in VSC or Gitpod? A search leads me the following question, so it seems at least I can check the environment variables, but is it reliable?

Yes, you can check for these environment variables:

1 Like