@oclif/core 4.8.2 → 4.8.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -156,23 +156,11 @@ class Config {
156
156
  if (typeof opts === 'string')
157
157
  opts = { root: opts };
158
158
  if (isConfig(opts)) {
159
- /**
160
- * Reload the Config based on the version required by the command.
161
- * This is needed because the command is given the Config instantiated
162
- * by the root plugin, which may be a different version than the one
163
- * required by the command.
164
- *
165
- * Doing this ensures that the command can freely use any method on Config that
166
- * exists in the version of Config required by the command but may not exist on the
167
- * root's instance of Config.
168
- */
169
- if (BASE !== opts._base) {
170
- debug(`reloading config from ${opts._base} to ${BASE}`);
171
- const config = new Config({ ...opts.options, plugins: opts.plugins });
172
- await config.load();
173
- return config;
174
- }
175
- return opts;
159
+ debug(`reloading config from ${opts._base} to ${BASE}`);
160
+ const pluginMap = new Map(opts.getPluginsList().map((p) => [p.name, p]));
161
+ const config = new Config({ ...opts.options, plugins: pluginMap });
162
+ await config.load();
163
+ return config;
176
164
  }
177
165
  const config = new Config(opts);
178
166
  await config.load();
@@ -215,10 +203,12 @@ class Config {
215
203
  if (SHELL) {
216
204
  shellPath = SHELL.split('/');
217
205
  }
218
- else if (this.windows && process.title.toLowerCase().includes('powershell')) {
206
+ else if (this.windows &&
207
+ (process.title.toLowerCase().includes('powershell') || process.title.toLowerCase().includes('pwsh'))) {
219
208
  shellPath = ['powershell'];
220
209
  }
221
- else if (this.windows && process.title.toLowerCase().includes('command prompt')) {
210
+ else if (this.windows &&
211
+ (process.title.toLowerCase().includes('command prompt') || process.title.toLowerCase().includes('cmd'))) {
222
212
  shellPath = ['cmd.exe'];
223
213
  }
224
214
  else if (this.windows && COMSPEC) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@oclif/core",
3
3
  "description": "base library for oclif CLIs",
4
- "version": "4.8.2",
4
+ "version": "4.8.4",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/oclif/core/issues",
7
7
  "dependencies": {