From c23309132af105c464179ea52a03481ac09a5a55 Mon Sep 17 00:00:00 2001 From: Eli Perelman Date: Mon, 18 Mar 2019 12:47:01 -0500 Subject: [PATCH 1/3] Add environment variables to spawned create process --- src/cli/commands/create.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cli/commands/create.js b/src/cli/commands/create.js index 6f45cb2a38..cdbcc0ad8c 100644 --- a/src/cli/commands/create.js +++ b/src/cli/commands/create.js @@ -4,6 +4,7 @@ import type Config from '../../config.js'; import {MessageError} from '../../errors.js'; import type {Reporter} from '../../reporters/index.js'; import * as child from '../../util/child.js'; +import {makeEnv} from '../../util/execute-lifecycle-script'; import {run as runGlobal, getBinFolder} from './global.js'; const path = require('path'); @@ -61,6 +62,7 @@ export async function run(config: Config, reporter: Reporter, flags: Object, arg const binFolder = await getBinFolder(config, {}); const command = path.resolve(binFolder, commandName); + const env = await makeEnv('create', config.cwd, config); - await child.spawn(command, rest, {stdio: `inherit`, shell: true}); + await child.spawn(command, rest, {stdio: `inherit`, shell: true, env}); } From 741f4611682fa5263fa5b67fa236f125406469b1 Mon Sep 17 00:00:00 2001 From: Eli Perelman Date: Mon, 18 Mar 2019 12:52:15 -0500 Subject: [PATCH 2/3] Add changelog for PR #7127 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 32cbae11b3..8c43f895c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,10 @@ Please add one entry in this file for each change in Yarn's behavior. Use the sa [#6724](https://github.com/yarnpkg/yarn/pull/6724) - [**Tom Milligan**](https://github.com/tommilligan) +- Add environment variables to spawned `create` process. + + [#7127](https://github.com/yarnpkg/yarn/pull/7127) - [**Eli Perelman**](https://github.com/eliperelman) + ## 1.15.2 The 1.15.1 doesn't exist due to a release hiccup. From 4a32e09f653fbdc4c2bad4ef6552c156f8ac8821 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Nison?= Date: Sun, 24 Mar 2019 12:43:07 +0100 Subject: [PATCH 3/3] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c43f895c9..d05a4e58cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,7 @@ Please add one entry in this file for each change in Yarn's behavior. Use the sa [#6724](https://github.com/yarnpkg/yarn/pull/6724) - [**Tom Milligan**](https://github.com/tommilligan) -- Add environment variables to spawned `create` process. +- Exposes the script environment variables to `yarn create` spawned processes. [#7127](https://github.com/yarnpkg/yarn/pull/7127) - [**Eli Perelman**](https://github.com/eliperelman)