Skip to content

Commit

Permalink
chore: Conditionally set envPath.APPDATA for tests (#1254)
Browse files Browse the repository at this point in the history
Fixes test failures on Windows.

Co-authored-by: Corey Farrell <git@cfware.com>
  • Loading branch information
XhmikosR and coreyfarrell committed Dec 27, 2019
1 parent 3445b19 commit fcd2115
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/helpers/run-nyc.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ const envPath = {
PATH: process.env.PATH
}

// Work around a Windows issue with `APPDATA`,
// https://github.com/istanbuljs/nyc/issues/1248
if ('APPDATA' in process.env) {
envPath.APPDATA = process.env.APPDATA
}

function sanitizeString (str, cwd, leavePathSep) {
/*
* File paths are different on different systems:
Expand Down

0 comments on commit fcd2115

Please sign in to comment.