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

scripts: flash_script.sh: Check the MAGISKBIN variable before constructing the environment #8425

Closed
wants to merge 1 commit into from

Conversation

Pzqqt
Copy link
Contributor

@Pzqqt Pzqqt commented Sep 27, 2024

If the MAGISKBIN variable is not configured, or is configured with an empty string, the installation script will become a script that formats the device. No one wants to accept such an outcome.

Even though our previous code was very rigorous, such an important check would not be redundant.

…cting the environment

If the MAGISKBIN variable is not configured, or is configured with
an empty string, the installation script will become a script that
formats the device. No one wants to accept such an outcome.

Even though our previous code was very rigorous, such an important
check would not be redundant.
@vvb2060 vvb2060 closed this Sep 27, 2024
@vvb2060
Copy link
Collaborator

vvb2060 commented Sep 27, 2024

It can't happen

MAGISKBIN="/data/adb/magisk"

@Pzqqt
Copy link
Contributor Author

Pzqqt commented Sep 28, 2024

It can't happen

MAGISKBIN="/data/adb/magisk"

I would avoid writing rm -rf $MAGISKBIN/* if it were me. 🤔

@vvb2060
Copy link
Collaborator

vvb2060 commented Sep 28, 2024

-rm -rf $MAGISKBIN/* 2>/dev/null
+rm -rf $MAGISKBIN 2>/dev/null

Do you mean this? Sure, update your PR.

@Pzqqt
Copy link
Contributor Author

Pzqqt commented Sep 29, 2024

-rm -rf $MAGISKBIN/* 2>/dev/null
+rm -rf $MAGISKBIN 2>/dev/null

Do you mean this? Sure, update your PR.

#8429

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.

2 participants