File tree Expand file tree Collapse file tree 3 files changed +9
-4
lines changed
msgraph-developer-proxy-plugins Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -34,11 +34,9 @@ public MockResponsePlugin() {
3434 _noMocks = new Option < bool ? > ( "--no-mocks" , "Disable loading mock requests" ) ;
3535 _noMocks . AddAlias ( "-n" ) ;
3636 _noMocks . ArgumentHelpName = "no mocks" ;
37- _noMocks . SetDefaultValue ( null ) ;
3837
3938 _mocksFile = new Option < string ? > ( "--mocks-file" , "Provide a file populated with mock responses" ) ;
4039 _mocksFile . ArgumentHelpName = "mocks file" ;
41- _mocksFile . SetDefaultValue ( null ) ;
4240 }
4341
4442 public override void Register ( IPluginEvents pluginEvents ,
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ public void InitResponsesWatcher() {
4646 }
4747
4848 string path = Path . GetDirectoryName ( _responsesFilePath ) ?? throw new InvalidOperationException ( $ "{ _responsesFilePath } is an invalid path") ;
49- _watcher = new FileSystemWatcher ( path ) ;
49+ _watcher = new FileSystemWatcher ( Path . GetFullPath ( path ) ) ;
5050 _watcher . NotifyFilter = NotifyFilters . CreationTime
5151 | NotifyFilters . FileName
5252 | NotifyFilters . LastWrite
Original file line number Diff line number Diff line change @@ -45,7 +45,14 @@ public ExecutionSummaryPlugin()
4545 return ;
4646 }
4747
48- var outputDir = Path . GetFullPath ( Path . GetDirectoryName ( outputFilePath ) ) ;
48+ var dirName = Path . GetDirectoryName ( outputFilePath ) ;
49+ if ( string . IsNullOrEmpty ( dirName ) )
50+ {
51+ // current directory exists so no need to check
52+ return ;
53+ }
54+
55+ var outputDir = Path . GetFullPath ( dirName ) ;
4956 if ( ! Directory . Exists ( outputDir ) )
5057 {
5158 input . ErrorMessage = $ "The directory { outputDir } does not exist.";
You can’t perform that action at this time.
0 commit comments