mirror of
https://github.com/hercules-ci/arion.git
synced 2024-11-23 00:32:12 +03:00
Implement uid parameter
This commit is contained in:
parent
77c492fa86
commit
02c0f80b02
@ -38,6 +38,7 @@ common deps
|
||||
, temporary
|
||||
, text
|
||||
, protolude
|
||||
, unix
|
||||
|
||||
flag ghci
|
||||
default: False
|
||||
|
@ -22,9 +22,10 @@ import qualified Data.Text.Lazy.Builder as TB
|
||||
import qualified Data.List.NonEmpty as NE
|
||||
import Data.List.NonEmpty (NonEmpty(..))
|
||||
|
||||
|
||||
import Control.Arrow ((>>>))
|
||||
|
||||
import System.Posix.User (getRealUserID)
|
||||
|
||||
data CommonOptions =
|
||||
CommonOptions
|
||||
{ files :: NonEmpty FilePath
|
||||
@ -159,8 +160,10 @@ runEvalAndDC cmd dopts opts = do
|
||||
}
|
||||
|
||||
defaultEvaluationArgs :: CommonOptions -> IO EvaluationArgs
|
||||
defaultEvaluationArgs co = pure EvaluationArgs
|
||||
{ evalUid = 0 -- TODO
|
||||
defaultEvaluationArgs co = do
|
||||
uid <- getRealUserID
|
||||
pure EvaluationArgs
|
||||
{ evalUid = fromIntegral uid
|
||||
, evalModules = files co
|
||||
, evalPkgs = pkgs co
|
||||
, evalWorkDir = Nothing
|
||||
|
Loading…
Reference in New Issue
Block a user