Skip to content

How is zx supposed to be used on Windows? #784

Answered by antongolub
msssk asked this question in Help needed
Discussion options

You must be logged in to vote

We've introduced a couple of helpers to make setup a little easier for Windows users. https://google.github.io/zx/setup#bash

import {usePwsh, $} from 'zx'

if (process.platform === 'win32') {
   usePwsh() // now `$.shell` refers to pwsh and `$.postfix` set to '; exit $LastExitCode' 
}
// ...
const foo = await $`bar baz`

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by msssk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants