Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

System-prefixed paths in yaml.schemas #267

Closed
amelio-vazquez-reina opened this issue Jan 21, 2020 · 2 comments
Closed

System-prefixed paths in yaml.schemas #267

amelio-vazquez-reina opened this issue Jan 21, 2020 · 2 comments
Labels

Comments

@amelio-vazquez-reina
Copy link

amelio-vazquez-reina commented Jan 21, 2020

I currently have the following in yaml.schemas in one of my computers:

   "yaml.schemas": {
      "file:///Users/amelio/.vscode-insiders/extensions/atlassian.atlascode-2.3.1/resources/schemas/pipelines-schema.json": "bitbucket-pipelines.yml"
    },

which in a different computer is:

   "yaml.schemas": {
      "file:///Users/avazquezreina/.vscode-insiders/extensions/atlassian.atlascode-2.3.1/resources/schemas/pipelines-schema.json": "bitbucket-pipelines.yml"
    },

Note that the only difference is that my $HOME path (user name) is different (amelio vs avazquezreina). How can I make this system agnostic so that I can use the same settings.json file across two computers?

E.g. Does this setting support environment variables?

@JPinkney
Copy link
Contributor

I don't think VSCode supports having env variables in settings: microsoft/vscode#2809

A workaround would be directly linking to the schema itself: https://bitbucket.org/atlassianlabs/atlascode/raw/4e9ef8faf727737cd9585bb01340117cd8236d44/resources/schemas/pipelines-schema.json

evidolob added a commit to evidolob/vscode-yaml that referenced this issue Jul 15, 2020
Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>
JPinkney pushed a commit that referenced this issue Jul 16, 2020
Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>
@Shaphil
Copy link

Shaphil commented May 3, 2021

I am having the same issue while switching between Windows and Ubuntu. If the schema is updated regularly, hardcoding a link https://bitbucket.org/atlassianlabs/atlascode/raw/4e9ef8faf727737cd9585bb01340117cd8236d44/resources/schemas/pipelines-schema.json may pose problems.
Can yaml.schemas be an array in that case, so that it can check if any of the values is correct, that will be used? Like this,

"yaml.schemas": [
  { "file:///{linux_path}/atlassian.atlascode-2.8.6/resources/schemas/pipelines-schema.json": "bitbucket-pipelines.yml" },
  { "file:///{windows_path}/atlassian.atlascode-2.8.6/resources/schemas/pipelines-schema.json": "bitbucket-pipelines.yml" },
]

If on the other hand the schema does not change, setting the yaml.schemas value to a url by the extension itself would be nicer.

@redhat-developer redhat-developer locked and limited conversation to collaborators Apr 23, 2022
@gorkem gorkem converted this issue into discussion #751 Apr 23, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
Projects
None yet
Development

No branches or pull requests

4 participants