Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fail starting Snap if no exports found #2357

Merged
merged 4 commits into from
Apr 24, 2024

Conversation

FrederikBolding
Copy link
Member

If no valid exports were found during initial eval of the Snap, fail early instead of potentially throwing misleading errors later.

@FrederikBolding FrederikBolding requested a review from a team as a code owner April 24, 2024 10:06
@@ -461,6 +461,9 @@ export class BaseSnapExecutor {
}
return acc;
}, {});

// If the Snap has no valid exports after this, fail.
assert(Object.keys(data.exports).length > 0, 'Snap has no valid exports.');
Copy link
Member Author

Choose a reason for hiding this comment

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

This is the main change - everything else is testing related

…tor.test.browser.ts

Co-authored-by: Maarten Zuidhoorn <maarten@zuidhoorn.com>
@FrederikBolding FrederikBolding merged commit 8cc7ad9 into main Apr 24, 2024
148 checks passed
@FrederikBolding FrederikBolding deleted the fb/fail-if-no-snap-exports branch April 24, 2024 14:43
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.

None yet

2 participants