@@ -66,6 +66,8 @@ if (args.h || args.help || args._.length > 1) {
66
66
for ( const entry of webpackConfig ) {
67
67
entry . mode = mode ;
68
68
if ( entry . output ) {
69
+ console . log ( "sending to" ) ;
70
+ console . log ( path . resolve ( process . cwd ( ) , destinationPath ) ) ;
69
71
entry . output . path = path . resolve ( process . cwd ( ) , destinationPath ) ;
70
72
}
71
73
}
@@ -88,25 +90,11 @@ if (args.h || args.help || args._.length > 1) {
88
90
} ) ;
89
91
90
92
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
97
94
if ( ! fs . existsSync ( path . resolve ( process . cwd ( ) , destinationPath ) ) ) {
98
95
console . log ( "resolve destinationPath doesn't exist" ) ;
99
- console . log ( "CREATE " ) ;
96
+ console . log ( "CREATING resolve destinationPath " ) ;
100
97
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" ) ;
110
98
}
111
99
112
100
fs . renameSync ( path . join ( process . cwd ( ) , 'queries.json' ) , path . resolve ( process . cwd ( ) , `${ destinationPath } /queries.json` ) ) ;
0 commit comments