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

Add flag to install an extension from the command line #504

Merged
merged 1 commit into from Apr 17, 2019

Conversation

code-asher
Copy link
Member

@code-asher code-asher commented Apr 16, 2019

Opted to just run VS Code's CLI with a small modification to ensure it always only does extension management. Not sure if this is the best way. We could directly import the file but then there were Typescript errors that I wasn't sure how to solve cleanly.

Also wasn't sure how to make Commander accept variadic options for an option. Maybe it's not possible?

@@ -162,6 +165,26 @@ const bold = (text: string | number): string | number => {
logger.warn('"--data-dir" is deprecated. Use "--user-data-dir" instead.');
}

if (options.installExtension) {
const fork = forkModule("vs/code/node/cli", [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super cool that this just works 🎊

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

Successfully merging this pull request may close these issues.

None yet

2 participants