File tree 2 files changed +9
-4
lines changed
2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -218,15 +218,15 @@ static void Main(string[] args)
218
218
( MonitorCommandOptions opts ) => RunMonitorCommand ( opts ) ,
219
219
( ExportCollectCommandOptions opts ) => RunExportCollectCommand ( opts ) ,
220
220
( ExportMonitorCommandOptions opts ) => RunExportMonitorCommand ( opts ) ,
221
- ( ConfigCommandOptions opts ) => SetupConfig ( opts ) ,
221
+ ( ConfigCommandOptions opts ) => RunConfigCommand ( opts ) ,
222
222
errs => 1
223
223
) ;
224
224
225
225
Log . Information ( "Attack Surface Analyzer Complete." ) ;
226
226
Log . CloseAndFlush ( ) ;
227
227
}
228
228
229
- private static int SetupConfig ( ConfigCommandOptions opts )
229
+ private static int RunConfigCommand ( ConfigCommandOptions opts )
230
230
{
231
231
DatabaseManager . SqliteFilename = opts . DatabaseFilename ;
232
232
@@ -982,9 +982,9 @@ public static ERRORS RunGuiMonitorCommand(MonitorCommandOptions opts)
982
982
FileSystemMonitor newMon = new FileSystemMonitor ( opts . RunId , dir , opts . InterrogateChanges ) ;
983
983
monitors . Add ( newMon ) ;
984
984
}
985
- catch ( ArgumentException e )
985
+ catch ( ArgumentException )
986
986
{
987
- Log . Information ( "{0} is an invalid path." , dir ) ;
987
+ Log . Warning ( "{0} is an invalid path." , dir ) ;
988
988
return ERRORS . INVALID_PATH ;
989
989
}
990
990
}
Original file line number Diff line number Diff line change @@ -279,6 +279,11 @@ public static void DeleteRun(string runid)
279
279
cmd . Parameters . AddWithValue ( "@run_id" , runid ) ;
280
280
using ( var reader = cmd . ExecuteReader ( ) )
281
281
{
282
+ if ( ! reader . HasRows )
283
+ {
284
+ Log . Warning ( "That Run ID wasn't found in the database" ) ;
285
+ return ;
286
+ }
282
287
while ( reader . Read ( ) )
283
288
{
284
289
using ( var inner_cmd = new SqliteCommand ( SQL_TRUNCATE_RUN , DatabaseManager . Connection , DatabaseManager . Transaction ) )
You can’t perform that action at this time.
0 commit comments