Which Cloudflare product(s) does this pertain to?
Pages, Wrangler
What version of Wrangler are you using?
2.16.0
What operating system are you using?
Linux
Describe the Bug
We are using Wrangler to do direct uploads to Pages. https://developers.cloudflare.com/pages/platform/direct-upload/ says:
If you are in a Git workspace, Wrangler will automatically pull the branch information for you.
In our (somewhat complex) configuration, that doesn't work for some reason. What is worse, I don't see anything about git detection in debug logs:
Failed to load .env file ".env": Error: ENOENT: no such file or directory, open '.env'
at Object.openSync (node:fs:601:3)
at Object.readFileSync (node:fs:469:35)
at tryLoadDotEnv (/deps/node_modules/wrangler/wrangler-dist/cli.js:126151:72)
at loadDotEnv (/deps/node_modules/wrangler/wrangler-dist/cli.js:126160:12)
at /deps/node_modules/wrangler/wrangler-dist/cli.js:148687:20
at /deps/node_modules/wrangler/wrangler-dist/cli.js:135073:16
at maybeAsyncResult (/deps/node_modules/wrangler/wrangler-dist/cli.js:133295:44)
at /deps/node_modules/wrangler/wrangler-dist/cli.js:135072:14
at /deps/node_modules/wrangler/wrangler-dist/cli.js:133282:22
at Array.reduce (<anonymous>) {
errno: -2,
syscall: 'open',
code: 'ENOENT',
path: '.env'
}
No folder available to cache configuration
-- START CF API REQUEST: ...
Please add some debug logs for git branch/commit/dirty detection so I can debug that problem.
Which Cloudflare product(s) does this pertain to?
Pages, Wrangler
What version of
Wranglerare you using?2.16.0
What operating system are you using?
Linux
Describe the Bug
We are using Wrangler to do direct uploads to Pages. https://developers.cloudflare.com/pages/platform/direct-upload/ says:
In our (somewhat complex) configuration, that doesn't work for some reason. What is worse, I don't see anything about git detection in debug logs:
Please add some debug logs for git branch/commit/dirty detection so I can debug that problem.