Skip to content

Commit

Permalink
refactor(e2e): Allow for passing custom env variables in `runNxComman…
Browse files Browse the repository at this point in the history
…dAsync`
  • Loading branch information
TriPSs committed Dec 24, 2023
1 parent 59baa88 commit 0a397c7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions e2e/utils/run-nx-command-async.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { runNxCommandAsync as _runNxCommandAsync } from '@nx/plugin/testing'

export async function runNxCommandAsync(command: string): Promise<void> {
export async function runNxCommandAsync(command: string, options: { env?: object } = {}): Promise<void> {
const { stdout, stderr } = await _runNxCommandAsync(command, {
silenceError: true,
env: {
YARN_ENABLE_HARDENED_MODE: '0'
YARN_ENABLE_HARDENED_MODE: '0',
...options.env
}
})

Expand Down

0 comments on commit 0a397c7

Please sign in to comment.