Skip to content

Commit

Permalink
Add a warning message that import dir does not exist in downloadOsmNe…
Browse files Browse the repository at this point in the history
…tworkData

Closes: #739
  • Loading branch information
greenscientist committed Dec 16, 2024
1 parent ee4cddb commit 1ff3d1a
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ export class DownloadOsmNetworkData implements GenericTask {
const polygonFile = filePath ? (filePath as string) : importDir + 'polygon.geojson';
const osmRawDataFile = osmRawFile ? (osmRawFile as string) : importDir + 'osm_network_data.osm';

// Check that the import directory is present. It's automatically created by the main transition app normally
if (!this._fileManager.fileExistsAbsolute(importDir)) {
console.log('Import directory does not exist, please create ', importDir);
return;
}

// Run the task
const polygonGeojson = await this._promptPolygon.getPolygon(polygonFile, {
interactive: filePath !== undefined ? false : defaultInteractive
Expand Down

0 comments on commit 1ff3d1a

Please sign in to comment.