File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 11#!/usr/bin/env node
22
3- const isServer = process . argv . length > 2 && process . argv [ 2 ] === "server" ;
3+ const subcommand = process . argv . length > 2 ? process . argv [ 2 ] : null ;
44
5- if ( isServer ) {
5+ if ( subcommand === "server" ) {
66 // Remove 'server' from args since main-server doesn't expect it as a positional argument.
77 process . argv . splice ( 2 , 1 ) ;
88 // eslint-disable-next-line @typescript-eslint/no-require-imports
99 require ( "./server" ) ;
10+ } else if ( subcommand === "version" ) {
11+ // eslint-disable-next-line @typescript-eslint/no-require-imports
12+ const { VERSION } = require ( "../version" ) as {
13+ VERSION : { git_describe : string ; git_commit: string } ;
14+ } ;
15+ console . log ( `mux ${ VERSION . git_describe } (${ VERSION . git_commit } )` ) ;
1016} else {
1117 // eslint-disable-next-line @typescript-eslint/no-require-imports
1218 require ( "../desktop/main" ) ;
You can’t perform that action at this time.
0 commit comments