Skip to content

How to keep temporary files on build failures? #3857

Closed
@nh2

Description

@nh2

In a project where my build is failing, I'm trying to inspect the intermediate files that GHC generates.

I tried

stack build --ghc-options=-keep-tmp-files

but it doesn't work, because while GHC doesn't delete its temp files, stack does.

I think it's because of this:

withExecuteEnv bopts boptsCli baseConfigOpts locals globalPackages snapshotPackages localPackages inner =
withSystemTempDir stackProgName $ \tmpdir -> do

Is there a way I can convince stack to keep the temporary directory for inspection? If not, I'd like to feature request that.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions