@@ -194,7 +194,12 @@ ob = \case
194194 ObCommand_Init source -> initProject source
195195 ObCommand_Deploy dc -> case dc of
196196 DeployCommand_Init deployOpts -> withProjectRoot "." $ \root -> do
197− thunkPtr <- getThunkPtr root (_deployInitOpts_remote deployOpts)
197+ thunkPtr <- readThunk root >>= \case
198+ Left err -> fail $ "thunk pack: " <> show err
199+ Right (ThunkData_Packed ptr) -> return ptr
200+ Right (ThunkData_Checkout (Just ptr)) -> return ptr
201+ Right (ThunkData_Checkout Nothing) ->
202+ getThunkPtr root (_deployInitOpts_remote deployOpts)
198203 let deployDir = _deployInitOpts_ouputDir deployOpts
199204 sshKeyPath = _deployInitOpts_sshKey deployOpts
200205 hostname = _deployInitOpts_hostname deployOpts