@@ -60,12 +60,16 @@ async function pnpmScript(name, extraArgs, options) {
60
60
)
61
61
const micromambaRootPath = path . resolve ( 'micromamba' )
62
62
const environmentFile = path . resolve ( 'environment.yml' )
63
- const environmentFileContents = fs . existsSync ( environmentFile ) ? fs . readFileSync ( environmentFile , 'utf8' ) : null
64
- const environmentName = fs . existsSync ( environmentFile ) ? environmentFileContents
65
- . split ( '\n' )
66
- . filter ( ( l ) => l . includes ( 'name:' ) ) [ 0 ]
67
- . split ( ':' ) [ 1 ]
68
- . trim ( ) : null
63
+ const environmentFileContents = fs . existsSync ( environmentFile )
64
+ ? fs . readFileSync ( environmentFile , 'utf8' )
65
+ : null
66
+ const environmentName = fs . existsSync ( environmentFile )
67
+ ? environmentFileContents
68
+ . split ( '\n' )
69
+ . filter ( ( l ) => l . includes ( 'name:' ) ) [ 0 ]
70
+ . split ( ':' ) [ 1 ]
71
+ . trim ( )
72
+ : null
69
73
70
74
const pnpmRootCommand = [ 'root' ]
71
75
const pnpmRootProcess = spawnSync ( 'pnpm' , pnpmRootCommand , {
@@ -301,20 +305,18 @@ async function pnpmScript(name, extraArgs, options) {
301
305
'pnpm' ,
302
306
'bindgen:typescript'
303
307
] )
304
- if ( ! fs . existsSync ( path . join ( typescriptOutputDir , 'package.json' ) ) ) {
305
- pnpmCommand = pnpmCommand . concat ( [
306
- '&&' ,
307
- 'pnpm' ,
308
- '--filter' ,
309
- `{${ typescriptOutputDir } }` ,
310
- 'install' ,
311
- '&&' ,
312
- 'pnpm' ,
313
- '--filter' ,
314
- `{${ typescriptOutputDir } }` ,
315
- 'build'
316
- ] )
317
- }
308
+ pnpmCommand = pnpmCommand . concat ( [
309
+ '&&' ,
310
+ 'pnpm' ,
311
+ '--filter' ,
312
+ `{${ typescriptOutputDir } }` ,
313
+ 'install' ,
314
+ '&&' ,
315
+ 'pnpm' ,
316
+ '--filter' ,
317
+ `{${ typescriptOutputDir } }` ,
318
+ 'build'
319
+ ] )
318
320
}
319
321
break
320
322
case 'build:gen:python' :
0 commit comments