Skip to content

Commit 0547fda

Browse files
committed
Address last smol comments
1 parent 08a2dc3 commit 0547fda

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

src/commands.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ export class Commands {
513513
configDir,
514514
);
515515
terminal.sendText(
516-
`${escapeCommandArg(binary)}${globalFlags.length === 0 ? "" : ` ${globalFlags.join(" ")}`} ssh ${app.workspace_name}`,
516+
`${escapeCommandArg(binary)}${` ${globalFlags.join(" ")}`} ssh ${app.workspace_name}`,
517517
);
518518
await new Promise((resolve) => setTimeout(resolve, 5000));
519519
terminal.sendText(app.command ?? "");

src/globalFlags.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ import { WorkspaceConfiguration } from "vscode";
22
import { getHeaderArgs } from "./headers";
33
import { escapeCommandArg } from "./util";
44

5+
/**
6+
* Returns global configuration flags for Coder CLI commands.
7+
* Always includes the `--global-config` argument with the specified config directory.
8+
*/
59
export function getGlobalFlags(
610
configs: WorkspaceConfiguration,
711
configDir: string,

src/remote.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -826,11 +826,11 @@ export class Remote {
826826

827827
private globalConfigs(label: string): string {
828828
const vscodeConfig = vscode.workspace.getConfiguration();
829-
const args: string[] = getGlobalFlags(
829+
const args = getGlobalFlags(
830830
vscodeConfig,
831831
path.dirname(this.storage.getSessionTokenPath(label)),
832832
);
833-
return args.length === 0 ? "" : ` ${args.join(" ")}`;
833+
return ` ${args.join(" ")}`;
834834
}
835835

836836
// showNetworkUpdates finds the SSH process ID that is being used by this

0 commit comments

Comments
 (0)