Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,12 @@ private String getProjectName(File directory, ExecutableTarget pythonExe, File s

String projectName = providedProjectName;

if (tomlParseResult != null) {
// TODO this whole section with the toml parsing can throw NPEs at different points, add try/catch instead of ifs at each step before merging.
if (tomlParseResult != null && (tomlParseResult.getTable(PROJECT_KEY) != null)) {
logger.info("The value of the condition is: " + (tomlParseResult != null && (tomlParseResult.getTable(PROJECT_KEY) != null)));
TomlTable projectTable = tomlParseResult.getTable(PROJECT_KEY);
if(projectTable.contains(NAME_KEY)) {
logger.info("Project table is: " + projectTable);
if( projectTable!= null && projectTable.contains(NAME_KEY)) {
projectName = projectTable.getString(NAME_KEY);
}
} else if (setupFile != null && setupFile.exists()) {
Expand Down