-
Notifications
You must be signed in to change notification settings - Fork 28k
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
CLI install extension command cannot run non-interactively #58434
Comments
@AdamVig May I know the use case why do you want to run this non interactively? |
@sandy081 Thanks for the reply. I use the VS Code CLI to install extensions in my dotfiles. Managing my extensions in my dotfiles helps keep them in sync between my personal and work computers. You can see the script that uses the CLI here. |
I agree that the CLI should have a way to run every command, especially extension based commands without interaction. I also have an installer that is installing a list of VS Code extensions, and while I haven't directly seen this issue yet, it would be a major issue if it did. |
Use --force to not to show prompts |
@sandy081 Based on the code I could see in the pull request, it looks like this may prevent the Is that the case? If so, they will be updated through some other mechanism, correct? edit: I installed VS Code Insiders and will verify that the feature works for me when it arrives in the insiders build. |
Use --force to non-interactively update VSCode plugins See microsoft/vscode#58434
@AdamVig No, it will not prevent. If there is an update and you pass |
I was able to verify that the fix is working for me. Thanks @sandy081 for jumping on this! |
I opened a related issue #59481 when testing this. However, I can actually repro that same issue when taking a previously installed extension and just updating its package.json to be an older version, making this issue broken or at least unverifiable for me. |
I can reproduce the error you see in #59481 and it is happening only in windows. Not sure if it is necessary to have both issues open. Is it ok to close the other one and track it here? |
I think let's have them separate. This issue is for allow installing / updating extension without any prompt and other issue should show the prompt while updating. |
@sbatten Did you try updating the extension using |
I have found that I am unable to reliably install extensions via the command line because of an update prompt that requires user interaction. A flag like
--yes
or--force
or--update
would be helpful in allowing the--install-extension
command to run non-interactively.Steps to Reproduce:
code --install-extension yzhang.markdown-all-in-one
(or any extension that has a newer version than the one you have installed)Extension 'yzhang.markdown-all-in-one' v1.6.0 is already installed, but a newer version 1.6.1 is available in the marketplace. Would you like to update? Yes(0) | No(1)
Does this issue occur when all extensions are disabled?: Yes (CLI command)
The text was updated successfully, but these errors were encountered: