Skip to content

Commit ae81d5d

Browse files
authored
Fix win install message (#6253)
* try: fix add-install-comment on win * build on this branch * Revert "build on this branch" This reverts commit 228f74e. * add instructions for windows shells * build on this branch * fix indentation * Revert "build on this branch" This reverts commit cd955db.
1 parent 9a6597f commit ae81d5d

File tree

1 file changed

+25
-4
lines changed

1 file changed

+25
-4
lines changed

scripts/add-install-comment.js

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const {
1313
getCIBuildUrl,
1414
} = require('./utils')
1515
const { addCommitComment } = require('@cypress/github-commit-status-check')
16-
const { stripIndent } = require('common-tags')
16+
const { html, stripIndent } = require('common-tags')
1717

1818
/* eslint-disable no-console */
1919

@@ -62,11 +62,32 @@ const getLinuxInstallMessage = () => {
6262
}
6363

6464
const getWindowsInstallMessage = () => {
65-
return stripIndent`
65+
return html`
6666
${preamble}
6767
68-
set CYPRESS_INSTALL_BINARY=${binary}
69-
npm install ${binary}
68+
Instructions are included below, depending on the shell you are using.
69+
70+
#### In Command Prompt (\`cmd.exe\`):
71+
72+
set CYPRESS_INSTALL_BINARY=${binary}
73+
npm install ${npm}
74+
75+
#### In PowerShell:
76+
77+
$env:CYPRESS_INSTALL_BINARY = ${binary}
78+
npm install ${npm}
79+
80+
#### In Git Bash:
81+
82+
export CYPRESS_INSTALL_BINARY=${binary}
83+
npm install ${npm}
84+
85+
#### Using \`cross-env\`:
86+
87+
If the above commands do not work for you, you can also try using \`cross-env\`:
88+
89+
npm i -g cross-env
90+
cross-env CYPRESS_INSTALL_BINARY=${binary} npm install ${npm}
7091
`
7192
}
7293

0 commit comments

Comments
 (0)