We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
如下所示,e.js 可以获得 环境变量。但是 s.yaml 无法转换
index.js
const { spawn } = require('child_process') const fs = require('fs') async function customSpawnSync(cmd, times) { return new Promise((resolve, reject) => { const child = spawn(cmd, { shell: true, stdio: 'inherit', // encoding: 'utf-8', env: { ...process.env, times } }); child.on('error', reject) // 子进程结束时输出 child.on('close', resolve); }) } (async () => { for (let times = 7; times <= 8; times++) { await customSpawnSync('node e', times) } })()
e.js
console.log('process.env.times:: ', process.env.times)
s.yaml
edition: 1.0.0 name: component-test access: default vars: service: internetAccess: true name: lib1-base times: ${env('times')} services: puppeteer: component: fc props: region: cn-qingdao service: ${vars.service} function: name: puppeteer-${vars.times} handler: index.handler timeout: 60 runtime: nodejs14 cpu: 0.05 diskSize: 512 instanceConcurrency: 1 memorySize: 128 codeUri: ./puppeteer
The text was updated successfully, but these errors were encountered:
发下s preview结果看一下
Sorry, something went wrong.
heimanba
No branches or pull requests
如下所示,e.js 可以获得 环境变量。但是 s.yaml 无法转换
index.js
e.js
s.yaml
The text was updated successfully, but these errors were encountered: