@@ -66,6 +66,8 @@ if (args.h || args.help || args._.length > 1) {
6666 for ( const entry of webpackConfig ) {
6767 entry . mode = mode ;
6868 if ( entry . output ) {
69+ console . log ( "sending to" ) ;
70+ console . log ( path . resolve ( process . cwd ( ) , destinationPath ) ) ;
6971 entry . output . path = path . resolve ( process . cwd ( ) , destinationPath ) ;
7072 }
7173 }
@@ -88,25 +90,11 @@ if (args.h || args.help || args._.length > 1) {
8890 } ) ;
8991
9092 if ( fs . existsSync ( path . join ( process . cwd ( ) , 'queries.json' ) ) ) {
91- // Debug the difference between path.resolve and path.join on different systems in the CI
92- // Most likely build/ doesn't exist
93- console . log ( "path.resolve(process.cwd(), `${destinationPath}/queries.json`)" ) ;
94- console . log ( path . resolve ( process . cwd ( ) , `${ destinationPath } /queries.json` ) ) ;
95- console . log ( "path.join(process.cwd(), `${destinationPath}/queries.json`)" ) ;
96- console . log ( path . join ( process . cwd ( ) , `${ destinationPath } /queries.json` ) ) ;
93+ // build folder doesn't exist
9794 if ( ! fs . existsSync ( path . resolve ( process . cwd ( ) , destinationPath ) ) ) {
9895 console . log ( "resolve destinationPath doesn't exist" ) ;
99- console . log ( "CREATE " ) ;
96+ console . log ( "CREATING resolve destinationPath " ) ;
10097 fs . mkdirSync ( path . resolve ( process . cwd ( ) , destinationPath ) ) ;
101- } else {
102- console . log ( "resolve destinationPath exists" ) ;
103- }
104- if ( ! fs . existsSync ( path . join ( process . cwd ( ) , destinationPath ) ) ) {
105- console . log ( "join destinationPath doesn't exist" ) ;
106- console . log ( "CREATE" ) ;
107- fs . mkdirSync ( path . join ( process . cwd ( ) , destinationPath ) ) ;
108- } else {
109- console . log ( "join destinationPath exists" ) ;
11098 }
11199
112100 fs . renameSync ( path . join ( process . cwd ( ) , 'queries.json' ) , path . resolve ( process . cwd ( ) , `${ destinationPath } /queries.json` ) ) ;
0 commit comments