-
-
Notifications
You must be signed in to change notification settings - Fork 239
Description
Currently, paths passed to the sourcemaps upload and sourcemaps inject subcommands' --ignore argument are always interpreted as being relative to the path(s) being uploaded/injected. In the case where multiple paths are passed to these commands, --ignore ignores the specified ignore path in both of the upload/inject paths.
Current behavior example
Suppose I run the following command:
sentry-cli sourcemaps {inject|upload} path_a path_b \
--ignore path_a/test \
--ignore /Users/myuser/Development/my_project/path_a/exclude_filesWe will inject/upload sourcemaps in ./path_a and ./path_b, ignoring any files in the following paths:
./path_a/path_a/test./path_a/Users/myuser/Development/my_project/path_a/exclude_files./path_b/path_a/test./path_b/Users/myuser/Development/my_project/path_a/exclude_files
In this example, the behavior is likely not what the user expected.
New behavior
The command above should inject/upload sourcemaps in ./path_a and ./path_b, ignoring any of the files in the following paths:
./path_a/test/Users/myuser/Development/my_project/path_a/exclude_files
In other words, we should stop interpreting the --ignore paths as being relative to the paths to inject/upload. If the paths start with a /, we interpret them as absolute paths; otherwise, we should interpret them as being relative to the current directory (i.e. ./).