37 Commits

Author SHA1 Message Date
hashicorp-copywrite[bot]
36a312ee26
add missing license headers and update copyright file headers to BUS-1.1 2023-08-10 21:53:25 +01:00
Chris Roberts
2d019cb608 Provide specialized messages on plugin install failure if possible
Inspect the error message received when failing to install a
    plugin. If it's something we can determine the cause, send
    back a cleaner error message to the user on how to resolve.
2021-03-08 15:57:13 -08:00
Chris Roberts
5195bee9ea Check if plugin install provides specification
During a plugin install, if the plugin is already installed and
activated, no specification will be returned as there was nothing
new installed. In this situation, look for the requested plugin
within the activated specifications. If it is found, then proceed
since the plugin is installed. If it is not found, return an error.
2020-05-06 15:51:37 -07:00
Chris Roberts
21c1bb5e05 Add support for caching solutions. Remove GEMRC modifications.
This pull request adds an enhancement to the internal Bundler class
to cache solution sets. This prevents Vagrant from generating a
solution for configured plugins on every run. Modifications to
the configured plugin list (global or local) will result in the
cached solution being invalidatd and resolved again.

Also included is the removal of the GEMRC modifications required
for Windows.
2020-02-03 07:43:17 -08:00
Chris Roberts
3ace82cc5b Update Vagrant.has_plugin? helper to function prior to plugin loading
Due to the Vagrantfile being loaded prior to plugin loading to determine
project local plugin information the Vagrant.has_plugin? helper will always
return false when the Vagrantfile is first loaded. To prevent this behavior
we can check for plugins in the plugin data files prior to the plugins
being loaded, and after they have been loaded we can fallback to the
original specification based check.
2018-08-31 14:03:42 -07:00
Chris Roberts
c5a6790192 Only run bundler initialization if plugin initialization is enabled 2018-07-18 10:48:22 -07:00
Chris Roberts
3223737734 Use env_local consistently internally 2018-07-17 14:49:41 -07:00
Chris Roberts
84c0aafe71 Support non-interactive local plugin install 2018-07-17 14:49:41 -07:00
Chris Roberts
40f4e6f67e Vagrant Environment isolated plugins
Adds support for plugins isolated to a specific `Vagrant::Environment`
which can be managed by the vagrant plugin command using the the
--local flag.
2018-07-17 14:49:41 -07:00
Chris Roberts
97715280c2 Deep merge plugin list with system plugins. Discard specifications correctly. 2017-06-27 19:05:30 -07:00
Chris Roberts
06e1b2f52c Include installed gem version plugin information. Clean after install and update. 2016-11-16 13:19:43 -08:00
Chris Roberts
174fe65d66 Sort plugins by name when generating install list 2016-11-11 15:11:45 -08:00
Chris Roberts
bd3f0c442c Only use Gem sources that are provided 2016-11-11 14:50:20 -08:00
Chris Roberts
6e40d46c50 Fix up local gem plugin installation when not published remotely 2016-11-11 14:25:03 -08:00
Chris Roberts
36d88ee268 Track installed gem version and display in startup logger information 2016-11-07 20:16:46 -08:00
Chris Roberts
1f5dd35d16 Remove bundler where no longer required 2016-11-07 20:00:38 -08:00
Seth Vargo
d2874064f4 Use .key? instead of .has_key? 2015-01-05 18:29:01 -05:00
Mitchell Hashimoto
d90bc9889a core: Lock in plugin install of a specific version 2014-04-29 16:53:12 -07:00
Mitchell Hashimoto
8c8c6c132c core: lock prerelease gems 2014-04-01 22:28:33 -07:00
Shawn Neal
0a2992b92d Fixed issue 3285
When using prerelease gems we need to ensure we store the gem version otherwise Bundler won't use the correct gem version since prerelease gems are not available by default. By storing the gem version for prerelease gems, we allow Bundler to properly resolve prerelease gems and not give potentially confusing errors to Vagrant users using prerelease plugins.
2014-03-21 08:15:24 -07:00
Mitchell Hashimoto
4437bcd77f core: better error if attempting to uninstall system plugin 2014-03-03 15:05:32 -08:00
Mitchell Hashimoto
b5637da6c4 core: plugin manager marks system gems as system 2014-03-03 14:55:34 -08:00
Mitchell Hashimoto
7710fd16fa core: load system plugins if they are installed 2014-03-03 09:44:29 -08:00
Mitchell Hashimoto
3f4058471c core: installing a plugin from a gem doesn't constrain it 2014-01-07 13:56:51 -08:00
Mitchell Hashimoto
b353865da1 core: specific versions "0.1.0" don't equate to "= 0.1.0" 2014-01-07 10:13:30 -08:00
Mitchell Hashimoto
3cefcda1e3 core: when installig local plugins, don't fetch remote 2014-01-06 10:52:14 -08:00
Mitchell Hashimoto
86cab61c27 commands/plugin: support installing from file 2014-01-06 09:27:37 -08:00
Mitchell Hashimoto
f612ec7549 core: support plugin sources, and mask Bundler errors 2014-01-05 23:13:49 -08:00
Mitchell Hashimoto
0117521744 commands/plugin: vagrant update is fancier now (see website docs) 2014-01-05 22:33:05 -08:00
Mitchell Hashimoto
5fe2994005 commands/plugin: convert all actions to use the new classes 2014-01-05 20:50:25 -08:00
Mitchell Hashimoto
8904319beb commands/plugin: install version and entrypoints work 2014-01-05 20:47:02 -08:00
Mitchell Hashimoto
eabc0f04fa friendly errors if a non-existent gem install is tried 2014-01-05 16:57:51 -08:00
Mitchell Hashimoto
e69723b63c core: Plugin::Manager.installed_specs doesn't use Bundler 2014-01-05 16:31:49 -08:00
Mitchell Hashimoto
e1c9431085 commands/plugin: uninstall works again 2014-01-05 16:02:00 -08:00
Mitchell Hashimoto
8cfa24143d Put plugins in their own Gemfile group so we can load on their own 2014-01-05 15:57:10 -08:00
Mitchell Hashimoto
86610bf735 installing gems works 2014-01-05 14:54:50 -08:00
Mitchell Hashimoto
1eef75a715 commands/plugin: list uses PluginManager 2014-01-05 08:42:34 -08:00