Skip to content

Commit

Permalink
fix: add contents to launcher binary
Browse files Browse the repository at this point in the history
  • Loading branch information
remarkablemark committed Jun 10, 2024
1 parent 57aeebb commit 8a4e928
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,8 @@ jobs:

- name: Check web support
run: ls ${{ steps.renpy.outputs.launcher}}/../web/index.html

- name: Build web
run: |
renpy-launcher web_build ${{ steps.renpy.outputs.launcher }}/../the_question --destination dist
ls dist dist.zip
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ describe.each([
]);

expect(mockedExec.exec).toHaveBeenCalledWith('echo', [
expect.stringMatching(/.+cli-name(.exe)? .+launcher .+[$@].+/),
expect.stringMatching(/^'.+cli-name(.exe)? .+launcher .+[$@].+'$/),
'>',
expect.stringContaining(launcherName),
]);
Expand Down
5 changes: 4 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,15 @@ export async function run() {
const launcherPath = getLauncherPath(binaryDirectory, launcherName);
await exec('touch', [launcherPath]);
await exec('echo', [
`${binaryPath} ${launcherDirectory} "$@"`,
`'${binaryPath} ${launcherDirectory} "$@"'`,
'>',
launcherPath,
]);
await exec('chmod', ['+x', launcherPath]);

// eslint-disable-next-line no-console
console.log(await exec('cat', [launcherPath]));

// Expose the SDK by adding it to the PATH
addPath(binaryDirectory);

Expand Down

0 comments on commit 8a4e928

Please sign in to comment.