Skip to content

cabal run creates dist-newstyle/cache/compiler in the current folder #10686

@Bodigrim

Description

@Bodigrim

Describe the bug
Running a standalone script (#!/usr/bin/env cabal) creates and leaves dist-newstyle/cache/compiler in the current folder. This is a regression in comparison to Cabal 3.14.1.0.

To Reproduce
Steps to reproduce the behavior:

$ ll dist-newstyle/cache/compiler; echo '#!/usr/bin/env cabal\n{- cabal:\nbuild-depends: base\n-}\nmain :: IO ()\nmain = pure ()' > Main.hs && chmod +x Main.hs && ./Main.hs && ll dist-newstyle/cache/compiler
ls: dist-newstyle/cache/compiler: No such file or directory
-rw-r--r--  1 andrew  staff  25365 Dec 29 01:31 dist-newstyle/cache/compiler

Expected behavior
With Cabal 3.14.1.0 no files are created in the current folder.

System information

  • macOS, GHC 9.6.6, Cabal HEAD built from 4b2e5f0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions