about summary refs log tree commit diff
path: root/.github
diff options
context:
space:
mode:
authorDaiderd Jordan <daiderd@gmail.com>2019-07-01T22·12+0200
committerDaiderd Jordan <daiderd@gmail.com>2019-07-01T22·12+0200
commit97baf32fbca13101f58d30bb3a601302c3d560f3 (patch)
treecae4a3c1ac75e8358e5906a6a06aba027d1c0f63 /.github
parent5c8f4772836cc14393068a9adce642da224615c4 (diff)
build: add exit code for hash and check mismatches
Makes it easier to identify the failure reason in other tooling, eg.
differentiate between a non-deterministic --check vs a failed build.

	$ nix-build '<nix/fetchurl.nix>' --argstr url http://example.org --argstr sha256 0000000000000000000000000000000000000000000000000000
	hash mismatch in fixed-output derivation '/nix/store/nzi9ck45rwlxzcwr25is7qlf3hs5xl83-example.org':
	  wanted: sha256:0000000000000000000000000000000000000000000000000000
	  got:    sha256:08y4734bm2zahw75b16bcmcg587vvyvh0n11gwiyir70divwp1rm
	$ echo $?
	102

	$ nix-build -E 'with import <nixpkgs> {}; runCommand "foo" {} "date +%s > $out"' --check
	warning: rewriting hashes in '/nix/store/g3k47g0399fvjmbm0p0mnad74k4w8vkz-foo'; cross fingers
	error: derivation '/nix/store/mggc8dz13ackb49qca6m23zq4fpq132q-foo.drv' may not be deterministic: output '/nix/store/g3k47g0399fvjmbm0p0mnad74k4w8vkz-foo' differs
	$ echo $?
	104
Diffstat (limited to '.github')
0 files changed, 0 insertions, 0 deletions