File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed
Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -23,11 +23,22 @@ const nodeModulesIgnore = `
2323const lastNode8Version = '3.16' ;
2424
2525module . exports = function getStartAndEndCommands ( {
26- packageJson : { name : projectName } ,
26+ packageJson,
2727 baseBlueprint,
2828 startBlueprint,
29- endBlueprint
29+ endBlueprint,
30+ emberCliUpdateJson
3031} ) {
32+ // ember-cli-update.json can override projectName and we should use the name field in package.json if it doesn't exist
33+ let projectName = emberCliUpdateJson ?. projectName ?? packageJson . name ;
34+
35+ // if we haven't overridden projectName in ember-cli-update or we don't have a name in the package.json file
36+ // default to containing dir name
37+ if ( ! projectName ) {
38+ let pathParts = process . cwd ( ) . split ( path . sep ) ;
39+ projectName = pathParts [ pathParts . length - 1 ] ;
40+ }
41+
3142 if ( baseBlueprint && ! baseBlueprint . isBaseBlueprint ) {
3243 throw new Error ( 'The intended base blueprint is not actually a base blueprint.' ) ;
3344 }
Original file line number Diff line number Diff line change @@ -214,7 +214,8 @@ module.exports = async function emberCliUpdate({
214214 packageJson,
215215 baseBlueprint,
216216 startBlueprint,
217- endBlueprint
217+ endBlueprint,
218+ emberCliUpdateJson
218219 } ) ;
219220
220221 return {
You can’t perform that action at this time.
0 commit comments