Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Display reason to require sudo #6316

Merged
8 commits merged into from Sep 24, 2018
Merged

Display reason to require sudo #6316

8 commits merged into from Sep 24, 2018

Commits on Apr 23, 2018

  1. Display reason to require sudo

    This is useful for non-interactive installation with bundler.
    okkez committed Apr 23, 2018
    Copy the full SHA
    6b112d2 View commit details
    Browse the repository at this point in the history
  2. Use double quote instead of single quote

        lib/bundler.rb:372:120: C: Style/StringLiteralsInInterpolation: Prefer double-quoted strings inside interpolations.
                  Bundler.ui.warn "Following files may not be writable, so sudo is needed: #{unwritable_files.map(&:to_s).join(',')}"
                                                                                                                               ^^^
    okkez committed Apr 23, 2018
    Copy the full SHA
    1e92ea9 View commit details
    Browse the repository at this point in the history
  3. Scan files array only once

    In normal case, all elements in `files` are writable.
    So all elements in `files` are scanned.
    okkez committed Apr 23, 2018
    Copy the full SHA
    0ac78cf View commit details
    Browse the repository at this point in the history
  4. Copy the full SHA
    8695c3d View commit details
    Browse the repository at this point in the history
  5. Use 0o for octal literals

        spec/bundler/bundler_spec.rb:251:25: C: Style/NumericLiteralPrefix: Use 0o for octal literals.
                FileUtils.chmod(0400, "tmp/vendor/bundle/unwritable.txt")
                                ^^^^
    okkez committed Apr 23, 2018
    Copy the full SHA
    c4d6f32 View commit details
    Browse the repository at this point in the history
  6. Copy the full SHA
    20fc9c7 View commit details
    Browse the repository at this point in the history
  7. Copy the full SHA
    04e888e View commit details
    Browse the repository at this point in the history
  8. Sort unwritable_files

    Because Dir#[] will return unsorted results.
    okkez committed Apr 23, 2018
    Copy the full SHA
    025110c View commit details
    Browse the repository at this point in the history