@dotenvx/dotenvx 1.19.1 → 1.19.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -1
- package/package.json +1 -1
- package/src/lib/helpers/executeCommand.js +10 -9
package/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
-
## [Unreleased](https://github.com/dotenvx/dotenvx/compare/v1.19.
|
|
5
|
+
## [Unreleased](https://github.com/dotenvx/dotenvx/compare/v1.19.2...main)
|
|
6
|
+
|
|
7
|
+
## 1.19.2
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
* forward additional signals like `SIGUSR2` ([#403](https://github.com/dotenvx/dotenvx/pull/403))
|
|
6
12
|
|
|
7
13
|
## 1.19.1
|
|
8
14
|
|
package/package.json
CHANGED
|
@@ -11,19 +11,19 @@ async function executeCommand (commandArgs, env) {
|
|
|
11
11
|
|
|
12
12
|
logger.debug(`executing process command [${commandArgs.join(' ')}]`)
|
|
13
13
|
|
|
14
|
-
let
|
|
14
|
+
let child
|
|
15
15
|
let signalSent
|
|
16
16
|
|
|
17
17
|
/* c8 ignore start */
|
|
18
18
|
const sigintHandler = () => {
|
|
19
19
|
logger.debug('received SIGINT')
|
|
20
20
|
logger.debug('checking command process')
|
|
21
|
-
logger.debug(
|
|
21
|
+
logger.debug(child)
|
|
22
22
|
|
|
23
|
-
if (
|
|
23
|
+
if (child) {
|
|
24
24
|
logger.debug('sending SIGINT to command process')
|
|
25
25
|
signalSent = 'SIGINT'
|
|
26
|
-
|
|
26
|
+
child.kill('SIGINT') // Send SIGINT to the command process
|
|
27
27
|
} else {
|
|
28
28
|
logger.debug('no command process to send SIGINT to')
|
|
29
29
|
}
|
|
@@ -32,12 +32,12 @@ async function executeCommand (commandArgs, env) {
|
|
|
32
32
|
const sigtermHandler = () => {
|
|
33
33
|
logger.debug('received SIGTERM')
|
|
34
34
|
logger.debug('checking command process')
|
|
35
|
-
logger.debug(
|
|
35
|
+
logger.debug(child)
|
|
36
36
|
|
|
37
|
-
if (
|
|
37
|
+
if (child) {
|
|
38
38
|
logger.debug('sending SIGTERM to command process')
|
|
39
39
|
signalSent = 'SIGTERM'
|
|
40
|
-
|
|
40
|
+
child.kill('SIGTERM') // Send SIGTERM to the command process
|
|
41
41
|
} else {
|
|
42
42
|
logger.debug('no command process to send SIGTERM to')
|
|
43
43
|
}
|
|
@@ -45,6 +45,7 @@ async function executeCommand (commandArgs, env) {
|
|
|
45
45
|
|
|
46
46
|
const handleOtherSignal = (signal) => {
|
|
47
47
|
logger.debug(`received ${signal}`)
|
|
48
|
+
child.kill(signal)
|
|
48
49
|
}
|
|
49
50
|
/* c8 ignore stop */
|
|
50
51
|
|
|
@@ -73,7 +74,7 @@ async function executeCommand (commandArgs, env) {
|
|
|
73
74
|
}
|
|
74
75
|
}
|
|
75
76
|
|
|
76
|
-
|
|
77
|
+
child = execute.execa(commandArgs[0], commandArgs.slice(1), {
|
|
77
78
|
stdio: 'inherit',
|
|
78
79
|
env: { ...process.env, ...env }
|
|
79
80
|
})
|
|
@@ -86,7 +87,7 @@ async function executeCommand (commandArgs, env) {
|
|
|
86
87
|
})
|
|
87
88
|
|
|
88
89
|
// Wait for the command process to finish
|
|
89
|
-
const { exitCode } = await
|
|
90
|
+
const { exitCode } = await child
|
|
90
91
|
|
|
91
92
|
if (exitCode !== 0) {
|
|
92
93
|
logger.debug(`received exitCode ${exitCode}`)
|