Skip to content

Warnings in bundle show #7

Description

@Robin481

The command "bundle show" does not necessarily only output the path to a gem but can also contain warnings.

For example for Rails projects on Ubuntu the per default added gem "tzinfo-data" adds this to bundle commands:

"The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`."

This in turn clutters the "bundle show gem" command and breaks the path that the gem wants to open.

I am aware that this problem is not specifically caused by the package itself but a one line regex can easily prevent this issue.

I suggest to add a regex to the confirmed function that filters potential warning messages out.

Modifying the 'confirmed' method in search_gem_view.coffee as follows works for me but I'm unsure whether this is an universal solution:

path = stdout.match(/\/home.*/)
atom.open(pathsToOpen: [path[0]]);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions