Skip to content

Commit 86f2530

Browse files
committed
address comments
1 parent e2550b5 commit 86f2530

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

sandbox/mod.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@ export type SandboxContext = GlobalOptions & {
1919
};
2020

2121
export const sandboxCreateCommand = new Command<SandboxContext>()
22-
.description(
23-
"Create a new sandbox in an organization\n\nIf Lifetime is 'session', it will start a SSH session.",
24-
)
22+
.description("Create a new sandbox in an organization")
2523
.option("--lifetime <duration:string>", "The lifetime of the sandbox", {
2624
default: "session",
2725
})
@@ -30,7 +28,7 @@ export const sandboxCreateCommand = new Command<SandboxContext>()
3028
})
3129
.option("-q, --quiet", "Don't pipe the command to the console")
3230
.option("--cwd <path:string>", "Working directory of the command")
33-
.option("--ssh", "SSH into the the sandbox")
31+
.option("--ssh", "SSH into the sandbox")
3432
.option("--expose-http <port:number>", "Expose the specified port")
3533
.arguments("<command...>")
3634
.example(
@@ -52,7 +50,7 @@ export const sandboxCreateCommand = new Command<SandboxContext>()
5250
org,
5351
lifetime: options.lifetime as `${number}s` | `${number}m` | "session",
5452
});
55-
if (options.lifetime === "session") {
53+
if (options.lifetime === "session" || options.ssh) {
5654
console.log(`Created sandbox with id '${sandbox.id}'`);
5755
}
5856

@@ -90,7 +88,7 @@ export const sandboxCreateCommand = new Command<SandboxContext>()
9088
Deno.exit(status.code);
9189
}
9290

93-
if (options.lifetime === "session" && options.ssh) {
91+
if (options.ssh) {
9492
const success = await sshIntoSandbox(sandbox);
9593
const stopMessage = "Stopping the sandbox...";
9694
if (success) {

0 commit comments

Comments
 (0)