Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cli): add --no-open option #635

Merged
merged 3 commits into from
Jan 26, 2022

Conversation

DerYeger
Copy link
Member

@DerYeger DerYeger commented Jan 26, 2022

Users expressed the desire to run Vitest and its UI in a container.
Since the --ui flag automatically opens the UI, using the UI in a container results in a crash.

This PR adds a --no-open option to skip the automatic opening while still exposing the UI.

Edit: Currently, options.noOpen was always undefined during my local tests. I'm not sure why though.|

@netlify
Copy link

netlify bot commented Jan 26, 2022

✔️ Deploy Preview for vitest-dev ready!

🔨 Explore the source changes: 6ec3e94

🔍 Inspect the deploy log: https://app.netlify.com/sites/vitest-dev/deploys/61f112c2cecd7d0008b7baf1

😎 Browse the preview: https://deploy-preview-635--vitest-dev.netlify.app

@DerYeger DerYeger self-assigned this Jan 26, 2022
@DerYeger DerYeger added the enhancement New feature or request label Jan 26, 2022
Copy link
Member

@patak-dev patak-dev left a comment

Choose a reason for hiding this comment

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

The option should be called --open. cac supports negated options https://www.npmjs.com/package/cac#negated-options, so we can have --open default to true (but it is only used when --ui is enabled), or the user can set --no-open

@DerYeger DerYeger marked this pull request as ready for review January 26, 2022 09:22
@antfu antfu changed the title feat: add --no-open option feat(cli): add --no-open option Jan 26, 2022
@antfu antfu merged commit a2013a5 into vitest-dev:main Jan 26, 2022
chaii3 pushed a commit to chaii3/vitest that referenced this pull request May 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants