File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ module.exports = async function upload(directory, args) {
3232 if ( config ) {
3333 await file ( config , configPath , filePath )
3434 } else {
35- console . log ( ' Failed to read or parse CoCreate.config.js.' ) ;
35+ console . log ( ` Failed to read or parse CoCreate.config.js for file: ${ filename } ` ) ;
3636 }
3737 }
3838 } ) ;
@@ -69,17 +69,18 @@ module.exports = async function upload(directory, args) {
6969 }
7070
7171 async function getConfig ( directory , filename = '' ) {
72+ let config , configPath
7273 const filePath = path . resolve ( directory , filename ) ;
73- if ( ! filePath . includes ( 'node_modules' ) ) {
74- const configPath = findClosestConfig ( filePath )
74+ if ( ! filePath . includes ( 'node_modules/ ' ) ) {
75+ configPath = findClosestConfig ( filePath )
7576 if ( configPath ) {
76- return { config : require ( configPath ) , configPath, filePath } ;
77-
77+ config = require ( configPath )
7878 } else {
7979 console . log ( 'No CoCreate.config file found in parent directories.' ) ;
8080 }
8181 }
8282
83+ return { config, configPath, filePath } ;
8384 }
8485
8586 function findClosestConfig ( filePath ) {
You can’t perform that action at this time.
0 commit comments