File.from picks up incorrect bucket name from passed URL #2448
Labels
api: storage
Issues related to the googleapis/nodejs-storage API.
priority: p2
Moderately-important priority. Fix may not be included in next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
I'm going crazy here, as I'm exactly replicating the test case: https://github.com/googleapis/nodejs-storage/pull/2432/files#diff-84c67ae7b647502a4aa36d73e488640768b074793ad0b8c940a22af156e96f0b
And there it worked.
The test also did run: https://github.com/googleapis/nodejs-storage/actions/runs/8440365167/job/23117068589?pr=2432#step:8:689
Though for me the bucket name is always
gs
...When running the regex in the browser it is clear why the issue exists:
The bucket name is at index
[0][2]
but here it's accessed by index[0][1]
(though I don't understand why the test wouldn't have caught it)
Environment details
v20.11.0
10.2.4
@google-cloud/storage
version:7.10.1
Steps to reproduce
npx gts init
(use defaults)npm i @google-cloud/storage
npm i ts-node
"start": "ts-node ./src/index.ts",
src/index.ts
to:npm run start
Making sure to follow these steps will guarantee the quickest resolution possible.
Thanks!
The text was updated successfully, but these errors were encountered: