File tree 5 files changed +14
-6
lines changed
5 files changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -23,8 +23,8 @@ patch-package finished with 1 error(s).
23
23
END SNAPSHOT"
24
24
` ;
25
25
26
- exports [` Test dev-only-patches: patch-package happily ignores slash because it's a dev dep 1` ] = `
27
- "SNAPSHOT: patch-package happily ignores slash because it's a dev dep
26
+ exports [` Test dev-only-patches: patch-package happily ignores slash on CI because it's a dev dep 1` ] = `
27
+ "SNAPSHOT: patch-package happily ignores slash on CI because it's a dev dep
28
28
patch-package 0.0.0
29
29
Applying patches...
30
30
Original file line number Diff line number Diff line change 3
3
4
4
echo " set production mode"
5
5
export NODE_ENV=production
6
+ export CI=" true"
6
7
7
8
echo " add patch-package"
8
9
yarn add $1
9
10
alias patch-package=./node_modules/.bin/patch-package
10
11
11
- echo " SNAPSHOT: patch-package happily ignores slash because it's a dev dep"
12
+ echo " SNAPSHOT: patch-package happily ignores slash on CI because it's a dev dep"
12
13
patch-package
13
14
echo " END SNAPSHOT"
14
15
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ yarn add $1
6
6
alias patch-package=./node_modules/.bin/patch-package
7
7
8
8
export NODE_ENV=" development"
9
- export CI=" "
9
+ export CI=" true "
10
10
11
11
(>&2 echo " SNAPSHOT: at dev time patch-package fails but returns 0" )
12
12
if ! patch-package;
Original file line number Diff line number Diff line change @@ -40,6 +40,10 @@ export function runIntegrationTest({
40
40
{
41
41
cwd : tmpDir . name ,
42
42
throwOnError : false ,
43
+ env : {
44
+ ...process . env ,
45
+ PATCH_PACKAGE_INTEGRATION_TEST : "1" ,
46
+ } ,
43
47
shell : true ,
44
48
} ,
45
49
)
Original file line number Diff line number Diff line change @@ -75,10 +75,13 @@ if (argv.version || argv.v) {
75
75
} else {
76
76
console . log ( "Applying patches..." )
77
77
const reverse = ! ! argv [ "reverse" ]
78
- // don't want to exit(1) on postinsall locally.
78
+ // don't want to exit(1) on postinstall locally.
79
79
// see https://github.com/ds300/patch-package/issues/86
80
80
const shouldExitWithError =
81
- ! ! argv [ "error-on-fail" ] || isCI || process . env . NODE_ENV === "test"
81
+ ! ! argv [ "error-on-fail" ] ||
82
+ ( process . env . NODE_ENV === "production" && isCI ) ||
83
+ ( isCI && ! process . env . PATCH_PACKAGE_INTEGRATION_TEST ) ||
84
+ process . env . NODE_ENV === "test"
82
85
83
86
const shouldExitWithWarning = ! ! argv [ "error-on-warn" ]
84
87
You can’t perform that action at this time.
0 commit comments