Skip to content

Commit

Permalink
confirmSave should check the goal of running an extension is actually…
Browse files Browse the repository at this point in the history
… to run tests.
  • Loading branch information
qadram committed Jun 29, 2019
1 parent fe0c3e7 commit 9095f2f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ export abstract class TextFileService extends Disposable implements ITextFileSer
}

async confirmSave(resources?: URI[]): Promise<ConfirmResult> {
if (this.environmentService.isExtensionDevelopment) {
if (this.environmentService.args.extensionTestsPath !== undefined) {
return ConfirmResult.DONT_SAVE; // no veto when we are in extension dev mode because we cannot assum we run interactive (e.g. tests)
}

Expand Down

2 comments on commit 9095f2f

@qadram
Copy link
Contributor Author

@qadram qadram commented on 9095f2f Jun 29, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixing #10027

@qadram
Copy link
Contributor Author

@qadram qadram commented on 9095f2f Jun 29, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not every time you are developing an extension means you want to run some tests, so if the goal if not asking to save dirty files was to prevent tests from prompting on those scenarios, a better check should be performed to cover that specific scenario.

Please sign in to comment.