Skip to content

Commit 0551832

Browse files
author
Kelly Selden
committed
supply cwd
1 parent 4c465d6 commit 0551832

1 file changed

Lines changed: 7 additions & 13 deletions

File tree

src/get-start-and-end-commands.js

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -147,14 +147,8 @@ module.exports.npx = async function npx(args, options) {
147147
async function runEmberLocally({
148148
packageRoot,
149149
cwd,
150-
projectName,
151-
blueprint,
152150
args
153151
}) {
154-
if (!blueprint.isBaseBlueprint) {
155-
cwd = path.join(cwd, projectName);
156-
}
157-
158152
await module.exports.spawn('node', [
159153
path.join(packageRoot, 'bin/ember'),
160154
...args
@@ -163,16 +157,11 @@ async function runEmberLocally({
163157

164158
async function runEmberRemotely({
165159
cwd,
166-
projectName,
167160
blueprint,
168161
args
169162
}) {
170163
let isCustomBlueprint = !isDefaultBlueprint(blueprint);
171164

172-
if (!blueprint.isBaseBlueprint) {
173-
cwd = path.join(cwd, projectName);
174-
}
175-
176165
if (isCustomBlueprint) {
177166
args = ['ember-cli', ...args];
178167
// args = ['-p', 'github:ember-cli/ember-cli#cfb9780', 'ember', 'new', projectName, '-sn', '-sg', '-b', `${blueprint.packageName}@${blueprint.version}`];
@@ -194,10 +183,15 @@ function createProject(runEmber) {
194183
}) => {
195184
return async function createProject(cwd) {
196185
async function _runEmber(blueprint) {
186+
let _cwd = cwd;
187+
188+
if (!blueprint.isBaseBlueprint) {
189+
_cwd = path.join(_cwd, projectName);
190+
}
191+
197192
await runEmber({
198193
packageRoot,
199-
cwd,
200-
projectName,
194+
cwd: _cwd,
201195
blueprint,
202196
args: getArgs({
203197
projectName,

0 commit comments

Comments
 (0)