Skip to content

Commit 1ea4242

Browse files
authored
Notebook cannot be "Saved As" in empty profile (fix microsoft#184631) (microsoft#184632)
1 parent 867f4ec commit 1ea4242

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/vs/workbench/services/workingCopy/common/storedFileWorkingCopy.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1110,10 +1110,13 @@ export class StoredFileWorkingCopy<M extends IStoredFileWorkingCopyModel> extend
11101110
primaryActions.push(toAction({
11111111
id: 'fileWorkingCopy.saveAs',
11121112
label: localize('saveAs', "Save As..."),
1113-
run: () => {
1113+
run: async () => {
11141114
const editor = this.workingCopyEditorService.findEditor(this);
11151115
if (editor) {
1116-
this.editorService.save(editor, { saveAs: true, reason: SaveReason.EXPLICIT });
1116+
const result = await this.editorService.save(editor, { saveAs: true, reason: SaveReason.EXPLICIT });
1117+
if (!result.success) {
1118+
this.doHandleSaveError(error); // show error again given the operation failed
1119+
}
11171120
}
11181121
}
11191122
}));

0 commit comments

Comments
 (0)