@@ -69,7 +69,7 @@ function archive_project(lt_config) {
6969 console . log ( "Ignoring files: " , ignore_files ) ;
7070 archive . glob (
7171 "**/*" ,
72- { cwd : process . cwd ( ) , ignore : ignore_files , dot : true } ,
72+ { cwd : process . cwd ( ) , ignore : ignore_files , dot : false } ,
7373 { prefix : "project/" }
7474 ) ;
7575 //OverRide NPM Dependencies
@@ -90,12 +90,12 @@ function archive_project(lt_config) {
9090 { prefix : "project/" }
9191 ) ;
9292 }
93- if (
94- lt_config . run_settings . dep_tokens &&
95- lt_config . run_settings . dep_tokens . length > 0
96- ) {
97- if ( fs . existsSync ( ".npmrc" ) ) {
98- let raw_data = fs . readFileSync ( ".npmrc" , "utf8" ) ;
93+ if ( fs . existsSync ( ".npmrc" ) ) {
94+ let raw_data = fs . readFileSync ( ".npmrc" , "utf8" ) ;
95+ if (
96+ lt_config . run_settings . dep_tokens &&
97+ lt_config . run_settings . dep_tokens . length > 0
98+ ) {
9999 let replace_map = { } ;
100100 for ( let i = 0 ; i < lt_config . run_settings . dep_tokens . length ; i ++ ) {
101101 if ( process . env [ lt_config . run_settings . dep_tokens [ i ] ] ) {
@@ -115,18 +115,21 @@ function archive_project(lt_config) {
115115 raw_data = raw_data . replace ( re , function ( matched ) {
116116 return replace_map [ matched ] ;
117117 } ) ;
118- archive . append (
119- raw_data ,
120- {
121- name : "project/.npmrc" ,
122- cwd : process . cwd ( ) ,
123- ignore : ignore_files ,
124- } ,
125- { prefix : "project/" }
126- ) ;
127- } else {
128- reject ( "Dep Tokens are passed but .npmrc does not exist" ) ;
129118 }
119+ archive . append (
120+ raw_data ,
121+ {
122+ name : "project/.npmrc" ,
123+ cwd : process . cwd ( ) ,
124+ ignore : ignore_files ,
125+ } ,
126+ { prefix : "project/" }
127+ ) ;
128+ } else if (
129+ lt_config . run_settings . dep_tokens &&
130+ lt_config . run_settings . dep_tokens . length > 0
131+ ) {
132+ reject ( "Dep Tokens are passed but .npmrc does not exist" ) ;
130133 }
131134
132135 archive . finalize ( ) ;
0 commit comments