Skip to content

Commit 9fc35e3

Browse files
authored
Merge pull request #659 from jpogran/gh-639-remove-bolt-commands
(GH-639) Deprecate Bolt commands
2 parents b97a9b3 + efe9272 commit 9fc35e3

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how
99
### Changed
1010

1111
- ([GH-649](https://github.com/puppetlabs/puppet-vscode/issues/649)) Reduce activation events for extension
12+
- ([GH-639](https://github.com/puppetlabs/puppet-vscode/issues/639)) Deprecate Bolt Commands
1213

1314
## [0.26.1] - 2020-05-12
1415

src/feature/BoltFeature.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,31 @@ import { reporter } from '../telemetry';
66

77
export class BoltFeature implements IFeature {
88
dispose() { }
9+
10+
showDeprecation(){
11+
let message = 'The "Open Bolt User Configuration File" and "Open Bolt User Inventory File" commands will be removed in a future release. Do you think they should be kept? Think there are other ways for this extension to help using Puppet Bolt? Let us know by clicking "Feedback" to add a comment to Github Issue #639';
12+
window.showWarningMessage(message,
13+
{ modal: false },
14+
{ title: 'Feedback' }
15+
).then(result => {
16+
if (result === undefined) {
17+
return;
18+
}
19+
20+
if (result.title === 'Feedback') {
21+
commands.executeCommand(
22+
'vscode.open',
23+
Uri.parse('https://github.com/puppetlabs/puppet-vscode/issues/639')
24+
);
25+
}
26+
});
27+
}
928
constructor(context: ExtensionContext) {
29+
1030
context.subscriptions.push(
1131
commands.registerCommand('puppet-bolt.OpenUserConfigFile', () => {
32+
this.showDeprecation();
33+
1234
let userInventoryFile = path.join(process.env['USERPROFILE'] || '~', '.puppetlabs', 'bolt', 'bolt.yaml');
1335

1436
this.openOrCreateFile(
@@ -25,6 +47,8 @@ export class BoltFeature implements IFeature {
2547

2648
context.subscriptions.push(
2749
commands.registerCommand('puppet-bolt.OpenUserInventoryFile', () => {
50+
this.showDeprecation();
51+
2852
let userInventoryFile = path.join(process.env['USERPROFILE'] || '~', '.puppetlabs', 'bolt', 'inventory.yaml');
2953

3054
this.openOrCreateFile(

0 commit comments

Comments
 (0)