Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
base: bfcfa77ba0a5
Choose a base ref
...
head repository: NixOS/nixpkgs
compare: 0abf1810668e
Choose a head ref
  • 3 commits
  • 1 file changed
  • 2 contributors

Commits on Oct 10, 2018

  1. nixos-option: don't abort with shell failures if options are not exis…

    …tant
    
    `nixos-option` basically handles two cases: the given option is either a
    valid option defined using `mkOption` or an attribute set which contains
    a set of options.
    
    If none of the above cases is valid, `$1` is invalid. Unfortunatley the
    script interpreted invalid options as an attribute set which rendered
    shell failures when trying to evaluate the arguments.
    
    First of all, `if names=$(attrNames ...)` resulted in `<PRIMOP>` as
    `attrNames` simply evaluated `builtins.attrNames $result` which results
    in a non-applied function with `$result` being empty. Trying to map over
    this string using `nixMap` while applying `escapeQuotes` causes the bash
    error as `eval echo "<PRIMOP>"` is invalid syntax.
    
    Explicitly checking if `$result' contains a value (do we have an
    attribute set?) and otherwise returning a warning and asking if $option
    exists fixes the problem.
    
    Fixes #48060
    Ma27 committed Oct 10, 2018
    Copy the full SHA
    76cc15a View commit details
    Browse the repository at this point in the history

Commits on Jan 24, 2019

  1. nixos-option: prune backtick from output

    It doesn't work good with double-click selection in terminal (it gets into selection buffer of some terminals)
    danbst committed Jan 24, 2019
    Copy the full SHA
    a866551 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #48153 from Ma27/fix-nixos-option-for-invalid-options

    nixos-option: don't abort with shell failures if options are not existant
    danbst committed Jan 24, 2019
    Copy the full SHA
    0abf181 View commit details
    Browse the repository at this point in the history