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(cli/migrate): tolerate non-UTF-8 in migration #9457

Merged
merged 8 commits into from Apr 15, 2024

Conversation

kornelski
Copy link
Contributor

When I ran cargo tauri migrate I got only:

Error Stream did not contain valid UTF-8

which is a completely unhelpful dead-end.

  • I've made stdout/stderr captures tolerate non-UTF-8 text.
  • I've added context to migrator's errors that help locate the root cause.
  • I've made migrator skip and warn about non-UTF-8 JavaScript files instead of aborting the entire operation.

@kornelski kornelski requested a review from a team as a code owner April 13, 2024 18:17
@amrbashir
Copy link
Member

Instead of skipping non-utf8 files, I changed it to replace bytes instead, tested by appending invalid utf8 bytes to a JS file echo -n -e '\x00\x9F\x92\x96' >> src/App.jsx, let me know if I missed anything

@amrbashir amrbashir changed the title Tolerate non-UTF-8 in migration fix(cli/migrate): tolerate non-UTF-8 in migration Apr 15, 2024
@amrbashir amrbashir merged commit 73c1c2d into tauri-apps:dev Apr 15, 2024
25 checks passed
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