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/nixos-channel-scripts
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 5146d2cb25c3
Choose a base ref
...
head repository: NixOS/nixos-channel-scripts
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 579cbfc50804
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Jan 3, 2020

  1. mirror-branch: Always exit with 1 on nix-instantiate error

    Resolving the values and being fancy is harder than the actual benefits
    would give out.
    
    Return all the info we have, and let the pager'd person deal with the
    data.
    samueldr committed Jan 3, 2020
    Copy the full SHA
    c4a61df View commit details
  2. Merge pull request #31 from samueldr/fix/2020-01-02-mirror-issue-2

     mirror-branch: Always exit with 1 on nix-instantiate error
    grahamc authored Jan 3, 2020
    Copy the full SHA
    579cbfc View commit details
Showing with 4 additions and 7 deletions.
  1. +4 −7 mirror-nixos-branch.pl
11 changes: 4 additions & 7 deletions mirror-nixos-branch.pl
Original file line number Diff line number Diff line change
@@ -75,14 +75,11 @@ sub fetch {
# Guard against the channel going back in time.
my @curReleaseUrl = split(/\//, read_file("$channelsDir/$channelName", err_mode => 'quiet') // "");
my $curRelease = pop @curReleaseUrl;
$! = 0; # Clear errno to avoid reporting non-fork/exec-related issues
my $d = `NIX_PATH= nix-instantiate --eval -E "builtins.compareVersions (builtins.parseDrvName \\"$curRelease\\").version (builtins.parseDrvName \\"$releaseName\\").version"`;
if ($? == -1) {
warn("could not execute nix-instantiate ($!).\n");
exit 127;
}
if ($? > 0) {
warn("error while executing nix-instantiate ($?).\n");
exit $?;
if ($? != 0) {
warn "Could not execute nix-instantiate: exit $?; errno $!\n";
exit 1;
}
chomp $d;
if ($d == 1) {