Skip to content

fix example script by appending .env#2174

Open
darren-trellis wants to merge 2 commits into
browserbase:mainfrom
darren-trellis:fix_example
Open

fix example script by appending .env#2174
darren-trellis wants to merge 2 commits into
browserbase:mainfrom
darren-trellis:fix_example

Conversation

@darren-trellis
Copy link
Copy Markdown

@darren-trellis darren-trellis commented May 29, 2026

why

pnpm run example fails because it does not have secrets.

what changed

the run script now appends secrets from .env

test plan

N/A


Summary by cubic

Fixes the example runner by optionally loading environment variables from the repo .env. Updates the example script in packages/core/package.json to use --env-file-if-exists=../../.env so pnpm run example picks up secrets when present and doesn’t fail if the file is missing.

Written for commit 8ae0e04. Summary will update on new commits.

Review in cubic

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 29, 2026

⚠️ No Changeset found

Latest commit: 8ae0e04

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions
Copy link
Copy Markdown
Contributor

This PR is from an external contributor and must be approved by a stagehand team member with write access before CI can run.
Approving the latest commit mirrors it into an internal PR owned by the approver.
If new commits are pushed later, the internal PR stays open but is marked stale until someone approves the latest external commit and refreshes it.

@github-actions github-actions Bot added external-contributor Tracks PRs mirrored from external contributor forks. external-contributor:awaiting-approval Waiting for a stagehand team member to approve the latest external commit. labels May 29, 2026
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 1 file

Confidence score: 3/5

  • There is a concrete usability regression risk in packages/core/package.json: the example script can fail immediately when ../../.env is absent because node --env-file throws.
  • Severity/confidence (6/10, 9/10) suggests this is a real, user-facing issue for local runs; switching to --env-file-if-exists should reduce friction without changing intended behavior.
  • Pay close attention to packages/core/package.json - update the example script flag to avoid hard-failing when the env file is missing.

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread packages/core/package.json Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external-contributor:awaiting-approval Waiting for a stagehand team member to approve the latest external commit. external-contributor Tracks PRs mirrored from external contributor forks.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant