@whyour/qinglong 2.17.9-rc.2 → 2.17.9-rc.4
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/package.json
CHANGED
|
@@ -45,7 +45,8 @@ function run() {
|
|
|
45
45
|
const fileName = process.argv[1].replace(`${dir_scripts}/`, '');
|
|
46
46
|
let command = `bash -c "source ${file_task_before} ${fileName}`;
|
|
47
47
|
if (task_before) {
|
|
48
|
-
|
|
48
|
+
const escapeTaskBefore = task_before.replace(/"/g, '\\"');
|
|
49
|
+
command = `${command} && echo -e '执行前置命令\n' && eval '${escapeTaskBefore}' && echo -e '\n执行前置命令结束\n'`;
|
|
49
50
|
}
|
|
50
51
|
const res = execSync(
|
|
51
52
|
`${command} && echo -e '${splitStr}' && NODE_OPTIONS= node -p 'JSON.stringify(process.env)'"`,
|
|
@@ -55,7 +55,8 @@ def run():
|
|
|
55
55
|
task_before = os.getenv("task_before")
|
|
56
56
|
|
|
57
57
|
if task_before:
|
|
58
|
-
|
|
58
|
+
escape_task_before = task_before.replace('"', '\\"')
|
|
59
|
+
command += f" && echo -e '执行前置命令\n' && eval '{escape_task_before}' && echo -e '\n执行前置命令结束\n'"
|
|
59
60
|
|
|
60
61
|
python_command = "PYTHONPATH= python3 -c 'import os, json; print(json.dumps(dict(os.environ)))'"
|
|
61
62
|
command += f" && echo -e '{split_str}' && {python_command}\""
|