Skip to content

Commit dcbdcba

Browse files
committed
fix: always include ssh port in generated config
1 parent d8c56d3 commit dcbdcba

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/cli/commands/init.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ function generateConfig(opts: ConfigOptions): string {
259259
const sshOpts: string[] = [];
260260
if (opts.sshHost) sshOpts.push(`host: '${opts.sshHost}'`);
261261
if (opts.sshUser) sshOpts.push(`user: '${opts.sshUser}'`);
262-
if (opts.sshPort && opts.sshPort !== 22) sshOpts.push(`port: ${opts.sshPort}`);
262+
sshOpts.push(`port: ${opts.sshPort ?? 22}`);
263263

264264
if (sshOpts.length > 0) {
265265
lines.push(` .ssh({ ${sshOpts.join(', ')} })`);

0 commit comments

Comments
 (0)