[eas-shared] fix: update cache check to return app path instead of directory #266
+4
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why
Currently the cache checker is not functioning properly, it's returning the directory instead of the cached app file.
It seems like the defect has been introduced in #256
How
While trying to install the same APK several times by using the same URL.
Test Plan
I have uploaded an example APK to here:
https://altay.wtf/stuff/example.apk, you can use it for convenience.If you run
expo-orbit-cli download https://altay.wtf/stuff/example.apktwice with the current version, you'll see the CLI returning parent directory path instead of the APK:and this error in the menubar app:
If you run it with the version that includes changes in this MR, it'll return the cached APK file as expected.
If you run it once, then delete the APK (not the directory) and run again, it'll re-download the APK as expected. 👍