@@ -62,8 +62,8 @@ export class MockGitHubApiServer extends DisposableObject {
6262 }
6363
6464 public async saveScenario ( ) : Promise < void > {
65- const scenariosDirectory = await this . getScenariosDirectory ( ) ;
66- if ( ! scenariosDirectory ) {
65+ const scenariosPath = await this . getScenariosPath ( ) ;
66+ if ( ! scenariosPath ) {
6767 return ;
6868 }
6969
@@ -73,7 +73,7 @@ export class MockGitHubApiServer extends DisposableObject {
7373 void window . showErrorMessage ( 'No scenario is currently being recorded.' ) ;
7474 return ;
7575 }
76- if ( this . recorder . scenarioRequestCount === 0 ) {
76+ if ( ! this . recorder . anyRequestsRecorded ) {
7777 void window . showWarningMessage ( 'No requests were recorded. Cancelling scenario.' ) ;
7878
7979 await this . stopRecording ( ) ;
@@ -90,13 +90,13 @@ export class MockGitHubApiServer extends DisposableObject {
9090 return ;
9191 }
9292
93- const filepath = await this . recorder . save ( scenariosDirectory , name ) ;
93+ const filePath = await this . recorder . save ( scenariosPath , name ) ;
9494
9595 await this . stopRecording ( ) ;
9696
97- const action = await window . showInformationMessage ( `Scenario saved to ${ filepath } ` , 'Open directory' ) ;
97+ const action = await window . showInformationMessage ( `Scenario saved to ${ filePath } ` , 'Open directory' ) ;
9898 if ( action === 'Open directory' ) {
99- await env . openExternal ( Uri . file ( filepath ) ) ;
99+ await env . openExternal ( Uri . file ( filePath ) ) ;
100100 }
101101 }
102102
@@ -118,10 +118,10 @@ export class MockGitHubApiServer extends DisposableObject {
118118 await this . recorder . clear ( ) ;
119119 }
120120
121- private async getScenariosDirectory ( ) : Promise < string | undefined > {
122- const scenariosDirectory = getMockGitHubApiServerScenariosPath ( ) ;
123- if ( scenariosDirectory ) {
124- return scenariosDirectory ;
121+ private async getScenariosPath ( ) : Promise < string | undefined > {
122+ const scenariosPath = getMockGitHubApiServerScenariosPath ( ) ;
123+ if ( scenariosPath ) {
124+ return scenariosPath ;
125125 }
126126
127127 const directories = await window . showOpenDialog ( {
0 commit comments