Skip to content

Commit af9b3e1

Browse files
authored
fix(cli): header will always print the correct profile (#2728)
1 parent df4ab97 commit af9b3e1

File tree

17 files changed

+28
-23
lines changed

17 files changed

+28
-23
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"trigger.dev": patch
3+
---
4+
5+
fix(cli): header will always print the correct profile

packages/cli-v3/src/commands/deploy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ export function configureDeployCommand(program: Command) {
162162
)
163163
.action(async (path, options) => {
164164
await handleTelemetry(async () => {
165-
await printStandloneInitialBanner(true);
165+
await printStandloneInitialBanner(true, options.profile);
166166
await deployCommand(path, options);
167167
});
168168
})

packages/cli-v3/src/commands/dev.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ async function startDev(options: StartDevOptions) {
205205
logger.loggerLevel = options.logLevel;
206206
}
207207

208-
await printStandloneInitialBanner(true);
208+
await printStandloneInitialBanner(true, options.profile);
209209

210210
let displayedUpdateMessage = false;
211211

packages/cli-v3/src/commands/env.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export function configureEnvCommand(program: Command) {
7171
)
7272
).action(async (options) => {
7373
await handleTelemetry(async () => {
74-
await printInitialBanner(false);
74+
await printInitialBanner(false, options.profile);
7575
await envListCommand(options);
7676
});
7777
});
@@ -95,7 +95,7 @@ export function configureEnvCommand(program: Command) {
9595
).action(async (name, options) => {
9696
await handleTelemetry(async () => {
9797
if (!options.raw) {
98-
await printInitialBanner(false);
98+
await printInitialBanner(false, options.profile);
9999
}
100100
await envGetCommand({ ...options, name });
101101
});
@@ -120,7 +120,7 @@ export function configureEnvCommand(program: Command) {
120120
.option("--force", "Overwrite the output file if it exists")
121121
).action(async (options) => {
122122
await handleTelemetry(async () => {
123-
await printInitialBanner(false);
123+
await printInitialBanner(false, options.profile);
124124
await envPullCommand(options);
125125
});
126126
});

packages/cli-v3/src/commands/init.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ export function configureInitCommand(program: Command) {
9898
)
9999
.action(async (path, options) => {
100100
await handleTelemetry(async () => {
101-
await printStandloneInitialBanner(true);
101+
await printStandloneInitialBanner(true, options.profile);
102102
await initCommand(path, options);
103103
});
104104
});

packages/cli-v3/src/commands/login.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export function configureLoginCommand(program: Command) {
5050
.version(VERSION, "-v, --version", "Display the version number")
5151
.action(async (options) => {
5252
await handleTelemetry(async () => {
53-
await printInitialBanner(false);
53+
await printInitialBanner(false, options.profile);
5454
await loginCommand(options);
5555
});
5656
});

packages/cli-v3/src/commands/logout.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export function configureLogoutCommand(program: Command) {
1818
return commonOptions(program.command("logout").description("Logout of Trigger.dev")).action(
1919
async (options) => {
2020
await handleTelemetry(async () => {
21-
await printInitialBanner(false);
21+
await printInitialBanner(false, options.profile);
2222
await logoutCommand(options);
2323
});
2424
}

packages/cli-v3/src/commands/mcp.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export function configureMcpCommand(program: Command) {
5858

5959
export async function mcpCommand(options: McpCommandOptions) {
6060
if (process.stdout.isTTY) {
61-
await printStandloneInitialBanner(true);
61+
await printStandloneInitialBanner(true, options.profile);
6262

6363
intro("Welcome to the Trigger.dev MCP server install wizard 🧙");
6464

packages/cli-v3/src/commands/preview.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export function configurePreviewCommand(program: Command) {
5353
)
5454
).action(async (path, options) => {
5555
await handleTelemetry(async () => {
56-
await printStandloneInitialBanner(true);
56+
await printStandloneInitialBanner(true, options.profile);
5757
await previewArchiveCommand(path, options);
5858
});
5959
});

packages/cli-v3/src/commands/promote.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export function configurePromoteCommand(program: Command) {
4949
)
5050
).action(async (version, options) => {
5151
await handleTelemetry(async () => {
52-
await printStandloneInitialBanner(true);
52+
await printStandloneInitialBanner(true, options.profile);
5353
await promoteCommand(version, options);
5454
});
5555
});

0 commit comments

Comments
 (0)