Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,846
    • Issues 4,846
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 458
    • Merge requests 458
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #20977

Closed
Open
Created Jan 21, 2022 by Javier Neira @jneira

`System.Environment.getEnv` fails in alpine-3.12 and ghc-9.2.1

Summary

System.Environment.getEnv "PATH" fails in alpine-3.12 and ghc-9.2.1 with

PATH: getEnv: does not exist (no environment variable)

in a fresh alpine-3.12 virtual machine and ghc-9.2.1 installed with ghcup

The bug has been discovered in the haskell-lanaguage-server ci (https://github.com/jneira/haskell-language-server/actions/runs/1726024910 / https://github.com/haskell/haskell-language-server/pull/2615) where we've noted:

  • With the same alpine container image all tested ghcs < 9.2.1 work
  • With the same github workflow ubuntu-18.02 works for ghc 9.2.1

Steps to reproduce

https://user-images.githubusercontent.com/54035/150512698-fd444d01-5034-4109-8652-1ec417e37b06.png

The concrete env var does not matter, it happens with $USER, $HOME and other vars known to be set in the environment

Expected behavior

System.Environment.getEnv should return the PATH env var value

Environment

  • GHC version used: 9.2.1

Optional:

  • Operating System: Alpine linux 3.12
  • System Architecture: x86_64
Edited Jan 21, 2022 by Javier Neira
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking