We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
gitCheckout
options
1 parent 472d5ae commit 6f0ec84Copy full SHA for 6f0ec84
packages/sandbox/src/sandbox.ts
@@ -1868,12 +1868,12 @@ export class Sandbox<Env = unknown> extends Container<Env> implements ISandbox {
1868
1869
async gitCheckout(
1870
repoUrl: string,
1871
- options: { branch?: string; targetDir?: string; sessionId?: string }
+ options?: { branch?: string; targetDir?: string; sessionId?: string }
1872
) {
1873
- const session = options.sessionId ?? (await this.ensureDefaultSession());
+ const session = options?.sessionId ?? (await this.ensureDefaultSession());
1874
return this.client.git.checkout(repoUrl, session, {
1875
- branch: options.branch,
1876
- targetDir: options.targetDir
+ branch: options?.branch,
+ targetDir: options?.targetDir
1877
});
1878
}
1879
0 commit comments