Skip to content

Use expected ig-data path even when it doesn't exist on the filesystem#489

Merged
ngfreiter merged 1 commit intomasterfrom
fix-missing-ig-data-crash
Jun 15, 2020
Merged

Use expected ig-data path even when it doesn't exist on the filesystem#489
ngfreiter merged 1 commit intomasterfrom
fix-missing-ig-data-crash

Conversation

@cmoesel
Copy link
Member

@cmoesel cmoesel commented Jun 12, 2020

Fixes #488

The IGExporter expects a path to be passed in, even if the path does not exist on the file system. If it receives null, it throws. Fix app.ts to never pass in a null path to the IGExporter.

Since we only get the path in one place, and since it is now a single line of code, we no longer have need for a separate getIgDataPath function.

The IGExporter expects a path to be passed in, even if the path does not exist on the file system. If it receives null, it throws.  Fix app.ts to never pass in a null path to the IGExporter.

Since we only get the path in one place, and since it is now a single line of code, we no longer have need for a separate getIgDataPath function.
@cmoesel cmoesel requested a review from ngfreiter June 12, 2020 22:34
@cmoesel
Copy link
Member Author

cmoesel commented Jun 12, 2020

BTW -- couldn't easily write a test since we don't currently have a framework/harness for testing app.ts. But... reproduce the error by running SUSHI 0.13.0 on a FSH Tank with no ig-data folder. It will fail. Then run this branch on the same FSH Tank. It will succeed.

Copy link
Contributor

@ngfreiter ngfreiter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@ngfreiter ngfreiter merged commit 69c54b8 into master Jun 15, 2020
@ngfreiter ngfreiter deleted the fix-missing-ig-data-crash branch June 15, 2020 12:41
@ngfreiter ngfreiter mentioned this pull request Jun 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SUSHI errors and exits when ig-data folder is missing

2 participants