File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -137,8 +137,9 @@ function compile(bannerWidth, transforms) {
137137
138138 // bower project
139139 } else {
140- var directory = path . resolve ( path . join ( BOWER , path . dirname ( original ) ) ) ;
141- var isFound = fs . existsSync ( directory ) && fs . statSync ( directory ) . isDirectory ( ) ;
140+ var partial = path . dirname ( original ) ;
141+ var directory = ( partial !== '.' ) && path . resolve ( path . join ( BOWER , partial ) ) ;
142+ var isFound = directory && fs . existsSync ( directory ) && fs . statSync ( directory ) . isDirectory ( ) ;
142143 if ( isFound ) {
143144 transformed = slash ( path . resolve ( path . join ( BOWER , original ) ) ) ; // path is within the bower directory
144145 }
@@ -197,7 +198,7 @@ function compile(bannerWidth, transforms) {
197198 return ( new RegExp ( '[\'"]' + analysis [ 1 ] + '[\'"]' ) ) . test ( fileText ) ;
198199 } )
199200 . shift ( ) ;
200- message = path . join ( analysis [ 2 ] , filename ) + ':0:0: ' + analysis [ 1 ] + '\n' ;
201+ message = path . join ( analysis [ 2 ] , filename ) + ':0:0: Cannot find import ' + analysis [ 1 ] + '\n' ;
201202
202203 // Unknown
203204 } else {
You can’t perform that action at this time.
0 commit comments