stack-1.2.0: The Haskell Tool Stack

Safe HaskellNone
LanguageHaskell2010

Stack.Runners

Description

Utilities for running stack commands.

Synopsis

Documentation

withGlobalConfigAndLock :: GlobalOpts -> StackT Config IO () -> IO () Source

Loads global config, ignoring any configuration which would be loaded due to $PWD.

withBuildConfigExt Source

Arguments

:: GlobalOpts 
-> Maybe (StackT Config IO ())

Action to perform before the build. This will be run on the host OS even if Docker is enabled for builds. The build config is not available in this action, since that would require build tools to be installed on the host OS.

-> (Maybe FileLock -> StackT EnvConfig IO ())

Action that uses the build config. If Docker is enabled for builds, this will be run in a Docker container.

-> Maybe (StackT Config IO ())

Action to perform after the build. This will be run on the host OS even if Docker is enabled for builds. The build config is not available in this action, since that would require build tools to be installed on the host OS.

-> IO () 

loadConfigWithOpts :: GlobalOpts -> IO (Manager, LoadConfig (StackLoggingT IO)) Source

Load the configuration with a manager. Convenience function used throughout this module.

withUserFileLock :: (MonadBaseControl IO m, MonadIO m) => GlobalOpts -> Path Abs Dir -> (Maybe FileLock -> m a) -> m a Source

Enforce mutual exclusion of every action running via this function, on this path, on this users account.

A lock file is created inside the given directory. Currently, stack uses locks per-snapshot. In the future, stack may refine this to an even more fine-grain locking approach.

munlockFile :: MonadIO m => Maybe FileLock -> m () Source

Unlock a lock file, if the value is Just