File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ describe("parseRuntimeString", () => {
4848 test ( "accepts SSH with hostname only (user will be inferred)" , ( ) => {
4949 const result = parseRuntimeString ( "ssh hostname" , workspaceName ) ;
5050 // When no user is specified, uses current user (process.env.USER)
51- const expectedUser = process . env . USER || "user" ;
51+ const expectedUser = process . env . USER ?? "user" ;
5252 expect ( result ) . toEqual ( {
5353 type : "ssh" ,
5454 host : "hostname" ,
@@ -59,7 +59,7 @@ describe("parseRuntimeString", () => {
5959 test ( "accepts SSH with hostname.domain only" , ( ) => {
6060 const result = parseRuntimeString ( "ssh dev.example.com" , workspaceName ) ;
6161 // When no user is specified, uses current user (process.env.USER)
62- const expectedUser = process . env . USER || "user" ;
62+ const expectedUser = process . env . USER ?? "user" ;
6363 expect ( result ) . toEqual ( {
6464 type : "ssh" ,
6565 host : "dev.example.com" ,
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ export function parseRuntimeString(
5353
5454 // Extract username from user@host format, or default to current user
5555 const atIndex = hostPart . indexOf ( "@" ) ;
56- const user = atIndex > 0 ? hostPart . substring ( 0 , atIndex ) : process . env . USER || "user" ;
56+ const user = atIndex > 0 ? hostPart . substring ( 0 , atIndex ) : process . env . USER ?? "user" ;
5757
5858 // Accept both "hostname" and "user@hostname" formats
5959 // SSH will use current user or ~/.ssh/config if user not specified
You can’t perform that action at this time.
0 commit comments