Files
start-os/agent/src/Lib/ProductKey.hs
Aiden McClelland 95d3845906 0.2.5 initial commit
Makefile incomplete
2020-11-23 13:44:28 -07:00

13 lines
356 B
Haskell

module Lib.ProductKey where
import Startlude
import Protolude.Unsafe ( unsafeHead )
import System.FilePath
productKeyPath :: FilePath -> FilePath
productKeyPath rt = rt </> "root/agent/product_key"
getProductKey :: Text -> IO Text
getProductKey rt = unsafeHead . lines <$> readFile (productKeyPath $ toS rt)