Skip to content

armgit / E2B

Public Imported from GitHub
0

Open-source, secure environment with real-world tools for enterprise-grade agents.

Format

Jakub Novakbb4d6fd000fd
diff --git a/packages/js-sdk/src/sandbox/index.ts b/packages/js-sdk/src/sandbox/index.ts
index 893a0fd0d..fac0d7ac2 100644
--- a/packages/js-sdk/src/sandbox/index.ts
+++ b/packages/js-sdk/src/sandbox/index.ts
@@ -389,7 +389,9 @@ export class Sandbox extends SandboxConnection {
} catch (err) {
triggerExit()
await unsubscribing
- if (/error starting process '\w+': fork\/exec \/bin\/bash: no such file or directory/.test((err as Error)?.message)) {
+ if (
+ /error starting process '\w+': fork\/exec \/bin\/bash: no such file or directory/.test((err as Error)?.message)
+ ) {
throw new CurrentWorkingDirectoryDoesntExistError(
`Failed to start the process. You are trying set 'cwd' to a directory that does not exist.\n${(err as Error)?.message}`
)
@@ -415,7 +417,6 @@ export class Sandbox extends SandboxConnection {
}
}
-
const _resolvePath = (path: string): string =>
resolvePath(path, this.cwd, this.logger)
}
@@ -465,7 +466,9 @@ export class Sandbox extends SandboxConnection {
* const sandbox = await Sandbox.reconnect(sandboxID)
* ```
*/
- static async reconnect(sandboxIDorOpts: string | Omit<SandboxOpts, 'id'> & { sandboxID: string }) {
+ static async reconnect(
+ sandboxIDorOpts: string | Omit<SandboxOpts, 'id'> & { sandboxID: string }
+ ) {
let sandboxID: string
let opts: SandboxOpts
if (typeof sandboxIDorOpts === 'string'){
diff --git a/packages/js-sdk/src/sandbox/sandboxConnection.ts b/packages/js-sdk/src/sandbox/sandboxConnection.ts
index 7a3e156a0..0993d38cf 100644
--- a/packages/js-sdk/src/sandbox/sandboxConnection.ts
+++ b/packages/js-sdk/src/sandbox/sandboxConnection.ts
@@ -111,8 +111,8 @@ export class SandboxConnection {
throw new Error('Cannot keep alive - sandbox is not initialized')
}
await refreshSandbox(this.apiKey, {
- instanceID: this.sandbox?.instanceID, duration,
- })
+ instanceID: this.sandbox?.instanceID, duration,
+ })
}