Sentry-cli: –-strip-prefix does not seem to work

Created on 3 Dec 2018  Â·  6Comments  Â·  Source: getsentry/sentry-cli

–-strip-prefix seems to have no effect whatsoever

artifacts are being uploaded as:
~/dist/10.a5b01fab658e826851b0.map
I want them to be uploaded as:
~/10.a5b01fab658e826851b0.map

I assumed that --strip-prefix ~/dist/ would solve this issue. I have not found anything in the docs to indicate this is wrong.

I have even taken a peek at the sentry-cli source code: https://github.com/getsentry/sentry-cli/blob/master/src/commands/releases.rs#L762

I also posted on the sentry forum: https://forum.sentry.io/t/sentry-cli-strip-prefix-does-not-seem-to-work/5373
can anybody offer some suggestions?
sentry-cli v1.37.0

Most helpful comment

I have the same issue.

All 6 comments

sentry-cli releases files testCLIRelease upload-sourcemaps . --ext map --ignore node_modules --strip-prefix '~/dist/' --rewrite

I have the same issue.

a workaround that worked for me is to use include: './dist/', I only needed to upload items from dist

new SentryWebpackPlugin({
  include: './dist/',
  ext: ['map'],
  ignore: ['node_modules', 'weback.config.js'],
})

Definitely it looks like a bug in the --strip-prefix implementation.
I'm not a rust guy but this function could be the culprit: https://github.com/getsentry/sentry-cli/blob/7741826c59f5ad8c14def29e4756019a5c4825d6/src/utils/sourcemaps.rs#L416

It would be nice to have some support from Sentry as we're paying for it.

Is anyone going to look into this? I have the same issue. Would be nice to get some input from sentry.. it's been open for 10 months with absolutely no response

Is anyone going to look into this? I have the same issue. Would be nice to get some input from sentry.. it's been open for 13 months with absolutely no response

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fungilation picture fungilation  Â·  4Comments

alexregier picture alexregier  Â·  4Comments

tbergq picture tbergq  Â·  3Comments

ValentinH picture ValentinH  Â·  3Comments

okon3 picture okon3  Â·  4Comments