-
-
Notifications
You must be signed in to change notification settings - Fork 221
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(sourcemaps): don't attempt to treat remote URL as a local file path
When a sourceMappingURL is a remote URL (e.g. static storage in an S3 bucket), `sentry-cli sourcemaps inject` was treating it like a normal file path, attempting to "normalize" it with the source path, and producing a bogus url such as `path/to/source/dir/https://some-static-host.example.com/path/to/foo.js.map`, which of course doesn't exist, and thus the sourcemap isn't found and doesn't have the debug id injected - even if it's sitting right there in the local directory, next to its corresponding bundled source file. With this change, the sourcemap discovery step does not attempt to use the discovered sourcemap URL if it is a remote URL. Instead, it falls back to guessing the sourcemap location based on the source filename and its location. I also changed a couple trycmd tests to remove the `+` before the timezone offset, as it causes the tests to fail when the local timezone is west of UTC. Fixes #1846.
- Loading branch information
Showing
3 changed files
with
45 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters