Skip to content

--version argument to include the vsc version #4163

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

Closed
JtMotoX opened this issue Sep 14, 2021 · 8 comments
Closed

--version argument to include the vsc version #4163

JtMotoX opened this issue Sep 14, 2021 · 8 comments
Assignees
Labels
enhancement Some improvement that isn't a feature

Comments

@JtMotoX
Copy link

JtMotoX commented Sep 14, 2021

Current:

code-server --version
3.11.1 acb5de66b71a3f8f1cc065df4633ecd3f9788d46

Desired (example):

code-server --version
3.11.1 acb5de66b71a3f8f1cc065df4633ecd3f9788d46 vsc-1.57.1
@JtMotoX JtMotoX added the feature New user visible feature label Sep 14, 2021
@jsjoeio jsjoeio added enhancement Some improvement that isn't a feature and removed feature New user visible feature labels Sep 14, 2021
@jsjoeio jsjoeio added this to the Backlog Candidates milestone Sep 14, 2021
@jsjoeio
Copy link
Contributor

jsjoeio commented Sep 14, 2021

Neat idea! Thanks for raising. Added to the Backlog Candidates which just means we'll wait for the community to weigh in.

@GirlBossRush
Copy link
Contributor

We technically support this via code-server —version —json

$ code-server --version --json
{
  codeServer: '3.11.1',
  commit: 'b9d79dc1988a30e129aa6452289cc69ad5da7a6c',
  vscode: '1.60.0'
}

@JtMotoX
Copy link
Author

JtMotoX commented Sep 15, 2021

We technically support this via code-server —version —json

Oh ok, I didn't realize there was a json flag. Maybe I should have read the documentation. This does not really solve my need though since this is not a valid json response. In the current response, json parsers cannot read it because it is not valid json. Json should have double quotes around the keys and values. Right now there are no double quotes around the keys, and the values have single quotes instead of double.

> code-server --version --json | jq -r '.vscode'
parse error: Invalid numeric literal at line 2, column 13

image

image

@GirlBossRush
Copy link
Contributor

@JtMotoX you are absolutely correct, and that’s a very easy fix. We can likely have it out in 3.12.1, however, here’s a temp fix:

$ node -e "console.log(JSON.stringify($(code-server --version --json)))”
{"codeServer":"3.11.1","commit":"acb5de66b71a3f8f1cc065df4633ecd3f9788d46","vscode":"1.57.1"}

@GirlBossRush GirlBossRush self-assigned this Sep 15, 2021
@JtMotoX
Copy link
Author

JtMotoX commented Sep 15, 2021

This workaround works. I will use this until the changes are applied on your side. Thanks 👍

> node -e "console.log(JSON.stringify($(code-server --version --json)))" | jq -r '.vscode'
1.57.1

> code --version | head -n1
1.57.1

@stale
Copy link

stale bot commented Mar 14, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no activity occurs in the next 5 days.

@stale stale bot added the stale label Mar 14, 2022
@jsjoeio
Copy link
Contributor

jsjoeio commented Mar 15, 2022

This was done in #4925 and is included in 4.1.0

@jsjoeio jsjoeio closed this as completed Mar 15, 2022
@jsjoeio jsjoeio removed this from the Backlog Candidates milestone Mar 15, 2022
@jsjoeio
Copy link
Contributor

jsjoeio commented Mar 15, 2022

Duplicate of #4874

@jsjoeio jsjoeio marked this as a duplicate of #4874 Mar 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Some improvement that isn't a feature
Projects
None yet
Development

No branches or pull requests

3 participants