diff --git a/doc/bugs/unusable_with_ghc_8.10.7_on_DragonFlyBSD/comment_1_70b807c69be263fd53c578fe6ec84561._comment b/doc/bugs/unusable_with_ghc_8.10.7_on_DragonFlyBSD/comment_1_70b807c69be263fd53c578fe6ec84561._comment new file mode 100644 index 0000000000..2481394326 --- /dev/null +++ b/doc/bugs/unusable_with_ghc_8.10.7_on_DragonFlyBSD/comment_1_70b807c69be263fd53c578fe6ec84561._comment @@ -0,0 +1,26 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 1""" + date="2021-12-31T15:05:40Z" + content=""" +It seems that somehow it is failing to set environment variables. Eg, +`GIT_INDEX_FILE` is what makes git use `.git/annex/index` and if it was not +set it would behave as you describe. + +This strongly suggests that there is a bug in the compiler/libraries. + +Here is a small test program: + + import System.Environment + import System.Process + + main = do + let p = (proc "sh" ["-c", "echo testing: $TEST"]) + let p' = p { env = Just [("TEST", "foo")] } + withCreateProcess p' $ \_ _ _ pid -> waitForProcess pid + setEnv "TEST" "bar" + withCreateProcess p $ \_ _ _ pid -> waitForProcess pid + +If run with "runghc foo.hs", that should output "testing: foo" and then +"testing: bar". +"""]]