mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
Merge pull request #7650 from eugene7646/invalid_profile_dev_8401
Autopsy CL does not return an error if given an invalid ingest profile name (8401)
This commit is contained in:
commit
3568e78867
@ -260,7 +260,7 @@ public class CommandLineIngestManager extends CommandLineManager {
|
|||||||
// run ingest
|
// run ingest
|
||||||
String ingestProfile = inputs.get(CommandLineCommand.InputType.INGEST_PROFILE_NAME.name());
|
String ingestProfile = inputs.get(CommandLineCommand.InputType.INGEST_PROFILE_NAME.name());
|
||||||
analyze(dataSource, ingestProfile);
|
analyze(dataSource, ingestProfile);
|
||||||
} catch (InterruptedException | CaseActionException ex) {
|
} catch (InterruptedException | CaseActionException | AnalysisStartupException ex) {
|
||||||
String dataSourcePath = command.getInputs().get(CommandLineCommand.InputType.DATA_SOURCE_PATH.name());
|
String dataSourcePath = command.getInputs().get(CommandLineCommand.InputType.DATA_SOURCE_PATH.name());
|
||||||
LOGGER.log(Level.SEVERE, "Error running ingest on data source " + dataSourcePath, ex);
|
LOGGER.log(Level.SEVERE, "Error running ingest on data source " + dataSourcePath, ex);
|
||||||
System.out.println("Error running ingest on data source " + dataSourcePath);
|
System.out.println("Error running ingest on data source " + dataSourcePath);
|
||||||
@ -520,7 +520,7 @@ public class CommandLineIngestManager extends CommandLineManager {
|
|||||||
// unable to find the user specified profile
|
// unable to find the user specified profile
|
||||||
LOGGER.log(Level.SEVERE, "Unable to find ingest profile: {0}. Ingest cancelled!", ingestProfileName);
|
LOGGER.log(Level.SEVERE, "Unable to find ingest profile: {0}. Ingest cancelled!", ingestProfileName);
|
||||||
System.out.println("Unable to find ingest profile: " + ingestProfileName + ". Ingest cancelled!");
|
System.out.println("Unable to find ingest profile: " + ingestProfileName + ". Ingest cancelled!");
|
||||||
return;
|
throw new AnalysisStartupException("Unable to find ingest profile: " + ingestProfileName + ". Ingest cancelled!");
|
||||||
}
|
}
|
||||||
|
|
||||||
// get FileSet filter associated with this profile
|
// get FileSet filter associated with this profile
|
||||||
@ -529,7 +529,7 @@ public class CommandLineIngestManager extends CommandLineManager {
|
|||||||
// unable to find the user specified profile
|
// unable to find the user specified profile
|
||||||
LOGGER.log(Level.SEVERE, "Unable to find file filter {0} for ingest profile: {1}. Ingest cancelled!", new Object[]{selectedProfile.getFileIngestFilter(), ingestProfileName});
|
LOGGER.log(Level.SEVERE, "Unable to find file filter {0} for ingest profile: {1}. Ingest cancelled!", new Object[]{selectedProfile.getFileIngestFilter(), ingestProfileName});
|
||||||
System.out.println("Unable to find file filter " + selectedProfile.getFileIngestFilter() + " for ingest profile: " + ingestProfileName + ". Ingest cancelled!");
|
System.out.println("Unable to find file filter " + selectedProfile.getFileIngestFilter() + " for ingest profile: " + ingestProfileName + ". Ingest cancelled!");
|
||||||
return;
|
throw new AnalysisStartupException("Unable to find file filter " + selectedProfile.getFileIngestFilter() + " for ingest profile: " + ingestProfileName + ". Ingest cancelled!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -271,6 +271,7 @@ public class CommandLineOptionProcessor extends OptionProcessor {
|
|||||||
newCommand.addInputValue(CommandLineCommand.InputType.CASES_BASE_DIR_PATH.name(), caseBaseDir);
|
newCommand.addInputValue(CommandLineCommand.InputType.CASES_BASE_DIR_PATH.name(), caseBaseDir);
|
||||||
newCommand.addInputValue(CommandLineCommand.InputType.DATA_SOURCE_ID.name(), dataSourceId);
|
newCommand.addInputValue(CommandLineCommand.InputType.DATA_SOURCE_ID.name(), dataSourceId);
|
||||||
newCommand.addInputValue(CommandLineCommand.InputType.INGEST_PROFILE_NAME.name(), ingestProfile);
|
newCommand.addInputValue(CommandLineCommand.InputType.INGEST_PROFILE_NAME.name(), ingestProfile);
|
||||||
|
newCommand.addInputValue(CommandLineCommand.InputType.DATA_SOURCE_PATH.name(), dataSourcePath);
|
||||||
commands.add(newCommand);
|
commands.add(newCommand);
|
||||||
runFromCommandLine(true);
|
runFromCommandLine(true);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user