Skip to content

--project-root doesn't expand relative paths #88

Open
@aaronklinker-st

Description

@aaronklinker-st

Describe the bug

I have a monorepo, whose sourcemaps rely on node modules in the root directory as well as the app directory. I tried setting --project-root option to ../.., but that didn't work. When running the below commands, the uploader doesn't expand the relative path, and thus fails to strip the project root from the source maps.

cd apps/app-name
bugsnag-source-maps upload-browser --project-root ../.. --dist apps/app-name/dist

This should either be documented or the path should be expanded if stripProjectRoot requires an absolute path.

The work around is to pass an absolute path for this URL, but that's very inconvenient.

pushd ../../
PROJECT_PATH="$(pwd)"
popd
bugsnag-source-maps upload-browser --project-root "$PROJECT_ROOT" --dist apps/app-name/dist

Steps to reproduce

  1. Run above command with a relative path for --project-root

Environment

  • bugsnag-source-maps version: 2.3.1
  • Uploading for:
    • Browser
  • Command that was run: bugsnag-source-maps upload-browser

Example code snippet

bugsnag-source-maps upload-browser --project-root ../.. --dist apps/app-name/dist

Metadata

Metadata

Assignees

No one assigned

    Labels

    backlogWe hope to fix this feature/bug in the futurebugConfirmed bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions