mirror of
https://github.com/whyour/qinglong.git
synced 2026-08-05 00:04:32 +08:00
fix: 防止 task_before 污染 Node.js 依赖路径
This commit is contained in:
@@ -98,7 +98,11 @@ function run() {
|
|||||||
const newEnvObject = JSON.parse(envStr);
|
const newEnvObject = JSON.parse(envStr);
|
||||||
if (typeof newEnvObject === 'object' && newEnvObject !== null) {
|
if (typeof newEnvObject === 'object' && newEnvObject !== null) {
|
||||||
for (const key in newEnvObject) {
|
for (const key in newEnvObject) {
|
||||||
if (Object.prototype.hasOwnProperty.call(newEnvObject, key)) {
|
if (
|
||||||
|
Object.prototype.hasOwnProperty.call(newEnvObject, key) &&
|
||||||
|
key !== 'NODE_PATH' &&
|
||||||
|
key !== 'QL_NODE_GLOBAL_PATH'
|
||||||
|
) {
|
||||||
process.env[key] = newEnvObject[key];
|
process.env[key] = newEnvObject[key];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user