File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#!/usr/bin/env node
2-
2+ 'use strict'
33const fs = require ( 'fs' )
44const path = require ( 'path' )
55
6- const packagedLauncherPath = path . join ( __dirname , 'launcher.js' )
7- const sourceLauncherPath = path . join (
8- __dirname ,
9- '..' ,
10- 'release-core' ,
11- 'launcher.js' ,
12- )
13- // Published packages must not let an unrelated sibling path shadow their
14- // bundled launcher. Source checkouts only fall back when that copy is absent.
6+ const packaged = path . join ( __dirname , 'launcher.js' )
7+ const source = path . join ( __dirname , '..' , 'release-core' , 'launcher.js' )
8+
159const { createLauncher } = require (
16- fs . existsSync ( packagedLauncherPath )
17- ? packagedLauncherPath
18- : sourceLauncherPath ,
10+ fs . existsSync ( packaged ) ? packaged : source
1911)
2012
2113const launcher = createLauncher ( {
@@ -28,8 +20,8 @@ const launcher = createLauncher({
2820module . exports = launcher
2921
3022if ( require . main === module ) {
31- launcher . main ( ) . catch ( ( error ) => {
32- console . error ( '❌ Unexpected error:' , error . message )
23+ launcher . main ( ) . catch ( err => {
24+ console . error ( '❌ Unexpected error:' , err . message )
3325 process . exit ( 1 )
3426 } )
3527}
You can’t perform that action at this time.
0 commit comments