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): fix migration from globalShortcut to global-shortcut #9262

Open
wants to merge 10 commits into
base: dev
Choose a base branch
from

Conversation

i-c-b
Copy link
Contributor

@i-c-b i-c-b commented Mar 25, 2024

@i-c-b i-c-b requested a review from a team as a code owner March 25, 2024 02:31
@i-c-b i-c-b marked this pull request as draft March 25, 2024 07:08
Ignoring all core modules allows for the command to be re-run multiple times without strange mutations.
Running `tauri migrate` more than once would wipe previously migrated capabilities.
@i-c-b i-c-b marked this pull request as ready for review March 25, 2024 15:08
)?;
} else {
log::info!(
"Skipping capabilities migration; migrated capabilities found in {}",
Copy link
Member

Choose a reason for hiding this comment

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

should we also print the migrated capability json here? so the user can compare both files (or maybe write to migrates.json.tmp)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The established pattern so far has been to print any manual changes. Rather than a temporary file that the user is expected to act on, would it be better to check if migrated.permissions is empty and, if not, make another file without the *:defaults?

Vector allocation and cloning is an expensive operation.
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