setExports xs = mapM_ se xs >> return ExitSuccess
    where se x = do let (name,val) = break (=='=') x
                    setExport name True
                    unless (null val) $ setEnv name $ drop 1 val

-- |We need to be able to do this in a sort of "half -v" mode in which
-- shell errors (bad substitution, parse, etc) cause it to quite, but
-- bad exitcodes are OK.
setExports xs = mapM_ se xs >> return ExitSuccess
    where se x = do let (name,val) = break (=='=') x
                    setExport name True
                    unless (null val) $ setEnv name $ drop 1 val

-- |We need to be able to do this in a sort of "half -v" mode in which
-- shell errors (bad substitution, parse, etc) cause it to quite, but
-- bad exitcodes are OK.
setExports xs = mapM_ se xs >> return ExitSuccess
    where se x = do let (name,val) = break (=='=') x
                    setExport name True
                    unless (null val) $ setEnv name $ drop 1 val

-- |We need to be able to do this in a sort of "half -v" mode in which
-- shell errors (bad substitution, parse, etc) cause it to quite, but
-- bad exitcodes are OK.