Skip to content

Commit

Permalink
add assert for playstore download url
Browse files Browse the repository at this point in the history
  • Loading branch information
leonitousconforti committed May 10, 2024
1 parent 10792e6 commit 3ac2e0f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/fount/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import * as assert from "node:assert";
import * as path from "node:path";
import * as url from "node:url";

Expand Down Expand Up @@ -94,6 +95,7 @@ export const loadApk = <T extends Games, U extends Extract<TrackedVersion<T>, An
// Not found in cache directory, need to download it
const results: readonly [string, IPuppeteerDetails] = yield* getApksupportDetails(game, versionInfo);
yield* Effect.logInfo(`Puppeteer scraping results: ${results[0]}`);
assert.ok(results[0].startsWith("https://play.googleapis.com/download/"));

// Stream the download directly to the downloads folder
const downloadedFile: string = `${cacheDirectory}/${desiredApkFilename}`;
Expand Down

1 comment on commit 3ac2e0f

@vercel
Copy link

@vercel vercel bot commented on 3ac2e0f May 10, 2024

Choose a reason for hiding this comment

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

Please sign in to comment.