Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • N nvidia-patch
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 26
    • Issues 26
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Keylase
  • nvidia-patch
  • Merge requests
  • !23

Results of shellcheck hunt

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/Snawoot/shellcheck into master Jan 04, 2019
  • Overview 2
  • Commits 2
  • Pipelines 0
  • Changes 1

Created by: Snawoot

Purpose of proposed changes

  • Fixes bug: message 'Something went wrong. Check nvidia driver' never displayed because $? always zero due to pipe containing last head which always succeeds.
  • Fix: https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing
  • Fix: https://www.shellcheck.net/wiki/SC2181 -- Check exit code directly with
  • Introduces strict mode of BASH operation:
    • Fail and exit on any undefined variables
    • Fail and exit on command errors
    • Fail pipes if any command in pipe fails (it was essential for nvidia-smi pipe)

General purpose of changes made is to make code safer to run and eliminate possibility of unexpected behavior.

Essential steps taken

Linted code with latest stable shellcheck, located potential and actual issues.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/Snawoot/shellcheck