From 0dc51877facc35df9a1a739ea0c4f44d4011c1f8 Mon Sep 17 00:00:00 2001 From: Mike McCready <66998419+MikeMcC399@users.noreply.github.com> Date: Sun, 4 May 2025 16:49:33 +0200 Subject: [PATCH 1/2] Add quoting advice for PowerShell CLI options --- docs/app/references/command-line.mdx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/app/references/command-line.mdx b/docs/app/references/command-line.mdx index 6a8f0ad627..110967dfeb 100644 --- a/docs/app/references/command-line.mdx +++ b/docs/app/references/command-line.mdx @@ -13,6 +13,13 @@ This guide assumes you've already read our installed Cypress as an `npm` module. After installing you'll be able to execute all of the commands in this document from your **project root**. +:::info + +You can alternatively require and run Cypress as a node module using our +[Module API](/app/references/module-api). + +::: + ## How to run commands You can run Cypress from your **project root** using a command which @@ -58,8 +65,9 @@ pnpm cypress run --record --spec "cypress/e2e/my-spec.cy.js" :::info -You can alternatively require and run Cypress as a node module using our -[Module API](/app/references/module-api). +**PowerShell** + +When `cypress run` [options](#Options) or `cypress open` [options](#Options-1) are specified with multiple values separated by commas, such as for `--conf` or `--env` options, and you are using PowerShell on Windows, you may need to surround the key/value pairs with quotes, for example: `--env "host=api.dev.local,port=4222"`. ::: From 8d0f439422435f96074705a17dd9e1a1f224b2bb Mon Sep 17 00:00:00 2001 From: Mike McCready <66998419+MikeMcC399@users.noreply.github.com> Date: Wed, 7 May 2025 19:24:17 +0200 Subject: [PATCH 2/2] Fix --config typo Co-authored-by: Jennifer Shehane --- docs/app/references/command-line.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/app/references/command-line.mdx b/docs/app/references/command-line.mdx index 110967dfeb..1ec960a2b7 100644 --- a/docs/app/references/command-line.mdx +++ b/docs/app/references/command-line.mdx @@ -67,7 +67,7 @@ pnpm cypress run --record --spec "cypress/e2e/my-spec.cy.js" **PowerShell** -When `cypress run` [options](#Options) or `cypress open` [options](#Options-1) are specified with multiple values separated by commas, such as for `--conf` or `--env` options, and you are using PowerShell on Windows, you may need to surround the key/value pairs with quotes, for example: `--env "host=api.dev.local,port=4222"`. +When `cypress run` [options](#Options) or `cypress open` [options](#Options-1) are specified with multiple values separated by commas, such as for `--config` or `--env` options, and you are using PowerShell on Windows, you may need to surround the key/value pairs with quotes, for example: `--env "host=api.dev.local,port=4222"`. :::