Skip to content

Commit b2e2f3d

Browse files
committed
Azure CI: retry installing nix on Linux
Works around NixOS/nix#2805
1 parent 636e3a7 commit b2e2f3d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.azure/azure-nightly-template-linux.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,12 @@ jobs:
2828
AWS_SECRET_ACCESS_KEY: $(AWS_SECRET_ACCESS_KEY)
2929
displayName: 'Installation ${{parameters.os}}'
3030
- script: |
31-
curl https://nixos.org/nix/install | sh
31+
# Retry installing nix due to nondeterministic error
32+
# Fatal error: glibc detected an invalid stdio handle
33+
# See:
34+
# https://github.com/nh2/static-haskell-nix/pull/27#issuecomment-502652181
35+
# https://github.com/NixOS/nix/issues/2733
36+
(for i in {1..5}; do bash <(curl https://nixos.org/nix/install) && exit 0; done; exit 1)
3237
source ~/.profile
3338
export STACK_ROOT="$(Build.SourcesDirectory)"/.stack-root;
3439
export PATH=$HOME/.local/bin:$PATH;

0 commit comments

Comments
 (0)