File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -23,10 +23,12 @@ function showGreeting() {
23
23
// Ensure consistent spacing before the greeting message.
24
24
// Different package managers handle output formatting differently - some automatically
25
25
// add a blank line before command output, while others do not.
26
- const { npm_execpath, npm_lifecycle_event } = process . env ;
26
+ const { npm_execpath, npm_lifecycle_event, NODE_RUN_SCRIPT_NAME } =
27
+ process . env ;
27
28
const isNpx = npm_lifecycle_event === 'npx' ;
28
29
const isBun = npm_execpath ?. includes ( '.bun' ) ;
29
- const prefix = isNpx || isBun ? '\n' : '' ;
30
+ const isNodeRun = Boolean ( NODE_RUN_SCRIPT_NAME ) ;
31
+ const prefix = isNpx || isBun || isNodeRun ? '\n' : '' ;
30
32
logger . greet ( `${ prefix } Rsbuild v${ RSBUILD_VERSION } \n` ) ;
31
33
}
32
34
You can’t perform that action at this time.
0 commit comments