Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 10 additions & 27 deletions .github/workflows/electron.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,32 +81,15 @@ jobs:
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: 24
- name: Install dependencies
run: yarn workspaces focus @internal/electron-example
- name: Build SDK dependencies
run: yarn workspaces foreach -pR --topological-dev --from '@internal/electron-example' run build
- name: Build example app
env:
ELECTRON_DISABLE_SANDBOX: '1'
run: yarn workspace @internal/electron-example build
- name: Setup Xvfb
run: |
sudo apt-get install -y xvfb
Xvfb :99 -screen 0 1024x768x24 > /tmp/xvfb.log 2>&1 &
- name: Install Playwright dependencies
run: yarn workspace @internal/electron-example playwright install --with-deps chromium
- uses: launchdarkly/gh-actions/actions/release-secrets@bbbbbda684f500766264e7fe327668094ba83d1c # release-secrets-v1.2.0
name: 'Get the mobile SDK key'
- uses: ./actions/run-example
with:
workspace_name: '@internal/electron-example'
aws_assume_role: ${{ vars.AWS_ROLE_ARN }}
ssm_parameter_pairs: '/sdk/common/hello-apps/mobile-key = LAUNCHDARKLY_MOBILE_KEY'
- uses: launchdarkly/gh-actions/actions/release-secrets@bbbbbda684f500766264e7fe327668094ba83d1c # release-secrets-v1.2.0
name: 'Get the test feature flag key'
with:
aws_assume_role: ${{ vars.AWS_ROLE_ARN }}
ssm_parameter_pairs: '/sdk/common/hello-apps/boolean-flag-key = LAUNCHDARKLY_FLAG_KEY'
- name: Run e2e tests
env:
ELECTRON_DISABLE_SANDBOX: '1'
DISPLAY: ':99'
run: yarn workspace @internal/electron-example test
env_vars: |
DISPLAY=:99
ELECTRON_DISABLE_SANDBOX=1
before_test: |
sudo apt-get install -y xvfb
Xvfb :99 -screen 0 1024x768x24 > /tmp/xvfb.log 2>&1 &
yarn workspace @internal/electron-example playwright install --with-deps chromium
yarn workspace @internal/electron-example start -- --build
Comment thread
cursor[bot] marked this conversation as resolved.
Comment thread
joker23 marked this conversation as resolved.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Double dash consumed by yarn, breaking electron build-exit

High Severity

The old build script was "electron-forge start -- --build", where the -- separator told electron-forge to pass --build through to the electron binary's process.argv. The new command yarn workspace @internal/electron-example start -- --build has yarn's CLI parser (Clipanion Option.Proxy()) consume the -- separator, resulting in electron-forge start --build without the --. Since --build is not a recognized electron-forge option, it likely won't reach process.argv, causing the process.argv.includes('--build') check in main.ts to fail. Instead of exiting immediately after building, the app would fully launch.

Additional Locations (1)
Fix in Cursor Fix in Web

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this is actually exactly what I want it to do.

Comment thread
devin-ai-integration[bot] marked this conversation as resolved.
15 changes: 15 additions & 0 deletions actions/run-example/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,34 @@ inputs:
before_test:
description: 'Shell commands to run before the e2e test step (e.g. install Playwright browsers)'
default: ''
env_vars:
description: 'Newline-separated KEY=VALUE pairs to set as environment variables for all subsequent steps'
default: ''
runs:
using: composite
steps:
- name: Install dependencies
shell: bash
run: yarn workspaces focus ${{ inputs.workspace_name }}

- name: Set environment variables
shell: bash
if: ${{ inputs.env_vars != '' }}
run: |
echo "${{ inputs.env_vars }}" >> $GITHUB_ENV

- uses: launchdarkly/gh-actions/actions/release-secrets@1a3dc56945c8e87bc952119b055f9481b4d642b0
name: 'Get the client-side SDK key'
with:
aws_assume_role: ${{ inputs.aws_assume_role }}
ssm_parameter_pairs: '/sdk/common/hello-apps/client-key = LAUNCHDARKLY_CLIENT_SIDE_ID'

- uses: launchdarkly/gh-actions/actions/release-secrets@1a3dc56945c8e87bc952119b055f9481b4d642b0
name: 'Get the mobile SDK key'
with:
aws_assume_role: ${{ inputs.aws_assume_role }}
ssm_parameter_pairs: '/sdk/common/hello-apps/mobile-key = LAUNCHDARKLY_MOBILE_KEY'

- uses: launchdarkly/gh-actions/actions/release-secrets@1a3dc56945c8e87bc952119b055f9481b4d642b0
name: 'Get the test feature flag key'
with:
Expand Down
1 change: 0 additions & 1 deletion packages/sdk/electron/example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"private": true,
"scripts": {
"start": "electron-forge start",
"build": "electron-forge start -- --build",
"test": "playwright test",
"clean": "electron-forge clean",
"package": "electron-forge package",
Expand Down
Loading