Closed ctaintor closed 2 months ago
I don't know that your suggested messaging is more correct. To me it should say "Installing" if being fresh installed, "Upgrading" only if upgrading (rather than every time) and "Using" if not installing or upgrading.
If you can make it do all three with relatively minimal code changes: would love a PR. Just adding "Upgrading" as you've described, though, feels no more correct to me given the passthrough.
Realistically, I think the only way to actually determine if you were Installing, Upgrading or Using would be to:
~/.vscode/extensions/#{extensionId}-#{version}
and the unzipped .vsix. If they differ, use "Upgrading" otherwise use "Using"This seems pretty heavyweight for changing a verb that has no functional impact. I think it'd be better to request that code
provide some sort of brew outdated
equivalent rather than digging into internals.
I'm leaning towards saying we should close this as a WONTFIX, at least given the current state of things.
Tend to agree.
thanks! we ended up doing this ourselves and not using brew bundle.
Currently
vscode
will basically just pass through tocode --install-extension
. This works even if you are installing from a local file. However, the message printed frombrew bundle
makes it sound like the extension is being installed every time (even though it may just be installing the same file again or updating the installed extension). I'd like this message to be more correct.So instead of it saying:
every time, I would want it to say:
on the first install and
The simplest thing I can think of is that the
vscode
command changes slightly, such that the name is always the extension's identifier – but it could optionally take a local vsix file. e.g.Then:
my.extension
is actually installed)code --install-extension <local-file>
We could make this more complex by actually reading the vsix file's manifest, getting the version, and only installing if the version from the manifest is different from the version that
code
responds with if you docode --list-extensions --show-versions
. However, not sure that's worth it unless there was a simple command to get the version details. I think the only "easy" way would be if you hadvsce
installed. Otherwise you're unzipping and reading XML...(I'm happy to send a PR for this)