Skip to content

Commit 6f928f8

Browse files
committed
Fallback to sudo for tigrisfs command
1 parent 53fd73b commit 6f928f8

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

apps/sandbox/src/providers/daytona/mod.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export class DaytonaSandbox implements BaseSandbox {
107107
: env.VOLUME_BUCKET;
108108

109109
await this.sandbox.process.executeCommand(
110-
`tigrisfs --endpoint "https://${env.ACCOUNT_ID}.r2.cloudflarestorage.com" ${bucketPath} ${path}`,
110+
`tigrisfs --endpoint "https://${env.ACCOUNT_ID}.r2.cloudflarestorage.com" ${bucketPath} ${path} || sudo tigrisfs --endpoint "https://${env.ACCOUNT_ID}.r2.cloudflarestorage.com" ${bucketPath} ${path}`,
111111
undefined,
112112
{
113113
AWS_ACCESS_KEY_ID: env.R2_ACCESS_KEY_ID!,

apps/sandbox/src/providers/deno/mod.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export class DenoSandbox implements BaseSandbox {
120120
await this.sandbox.spawn("sh", {
121121
args: [
122122
"-c",
123-
`tigrisfs --endpoint "https://${env.ACCOUNT_ID}.r2.cloudflarestorage.com" ${bucketPath} ${path}`,
123+
`tigrisfs --endpoint "https://${env.ACCOUNT_ID}.r2.cloudflarestorage.com" ${bucketPath} ${path} || sudo tigrisfs --endpoint "https://${env.ACCOUNT_ID}.r2.cloudflarestorage.com" ${bucketPath} ${path}`,
124124
],
125125
stdin: "null",
126126
stdout: "piped",

apps/sandbox/src/providers/sprites/mod.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ export class SpriteSandbox implements BaseSandbox {
148148
"bash",
149149
[
150150
"-c",
151-
`tigrisfs --endpoint "https://${env.ACCOUNT_ID}.r2.cloudflarestorage.com" ${bucketPath} ${path}`,
151+
`tigrisfs --endpoint "https://${env.ACCOUNT_ID}.r2.cloudflarestorage.com" ${bucketPath} ${path} || sudo tigrisfs --endpoint "https://${env.ACCOUNT_ID}.r2.cloudflarestorage.com" ${bucketPath} ${path}`,
152152
],
153153
{
154154
env: {

apps/sandbox/src/providers/vercel/mod.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export class VercelSandbox implements BaseSandbox {
100100
cmd: "sh",
101101
args: [
102102
"-c",
103-
`tigrisfs --endpoint "https://${env.ACCOUNT_ID}.r2.cloudflarestorage.com" ${bucketPath} ${path}`,
103+
`tigrisfs --endpoint "https://${env.ACCOUNT_ID}.r2.cloudflarestorage.com" ${bucketPath} ${path} || sudo tigrisfs --endpoint "https://${env.ACCOUNT_ID}.r2.cloudflarestorage.com" ${bucketPath} ${path}`,
104104
],
105105
env: {
106106
AWS_ACCESS_KEY_ID: env.R2_ACCESS_KEY_ID!,

0 commit comments

Comments
 (0)