diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,9 @@
 # Version history for ghcup
 
+## 0.2.3.0 -- 2026-05-22
+
+* [fix bug](https://github.com/haskell/ghcup-hs/pull/1338) when passing `--install-targets` causes failure
+
 ## 0.2.2.0 -- 2026-05-21
 
 * fix minor bug in "new tool available" update check
diff --git a/ghcup.cabal b/ghcup.cabal
--- a/ghcup.cabal
+++ b/ghcup.cabal
@@ -1,6 +1,6 @@
 cabal-version:      2.4
 name:               ghcup
-version:            0.2.2.0
+version:            0.2.3.0
 license:            LGPL-3.0-only
 license-file:       LICENSE
 copyright:          Julian Ospald 2024
diff --git a/lib-opt/GHCup/OptParse/Install.hs b/lib-opt/GHCup/OptParse/Install.hs
--- a/lib-opt/GHCup/OptParse/Install.hs
+++ b/lib-opt/GHCup/OptParse/Install.hs
@@ -335,6 +335,7 @@
                        , NoInstallInfo
                        , GHCup.Errors.ParseError
                        , MalformedInstallInfo
+                       , InvalidBuildConfig
                        ]
 
 
diff --git a/lib-opt/GHCup/OptParse/Run.hs b/lib-opt/GHCup/OptParse/Run.hs
--- a/lib-opt/GHCup/OptParse/Run.hs
+++ b/lib-opt/GHCup/OptParse/Run.hs
@@ -215,6 +215,7 @@
                    , ParseError
                    , IncompatibleConfig
                    , MalformedInstallInfo
+                   , InvalidBuildConfig
                    ]
 
 
@@ -368,6 +369,7 @@
                               , ParseError
                               , FileDoesNotExistError
                               , MalformedInstallInfo
+                              , InvalidBuildConfig
                               ] (ResourceT (ReaderT AppState m)) ()
    installToolChainFull Toolchain{..} tmp = do
          case ghcVer of
diff --git a/lib-tui/GHCup/Brick/Actions.hs b/lib-tui/GHCup/Brick/Actions.hs
--- a/lib-tui/GHCup/Brick/Actions.hs
+++ b/lib-tui/GHCup/Brick/Actions.hs
@@ -267,6 +267,7 @@
               , URIParseError
               , NoInstallInfo
               , MalformedInstallInfo
+              , InvalidBuildConfig
               ]
 
       withNoVerify :: (MonadReader AppState m) => m a -> m a
diff --git a/lib/GHCup/Command/Compile/HLS.hs b/lib/GHCup/Command/Compile/HLS.hs
--- a/lib/GHCup/Command/Compile/HLS.hs
+++ b/lib/GHCup/Command/Compile/HLS.hs
@@ -264,7 +264,7 @@
 
   liftE $ runBuildAction
     tmpUnpack
-    (reThrowAll @_ @'[GPGError, DownloadFailed, DigestError, ContentLengthError, PatchFailed, ProcessError, FileAlreadyExistsError, CopyError, ParseError , MergeFileTreeError , MalformedInstallInfo, FileDoesNotExistError, NoInstallInfo] @'[BuildFailed] (BuildFailed $ fromGHCupPath workdir) $ do
+    (reThrowAll @_ @'[GPGError, DownloadFailed, DigestError, ContentLengthError, PatchFailed, ProcessError, FileAlreadyExistsError, CopyError, ParseError , MergeFileTreeError , MalformedInstallInfo, FileDoesNotExistError, NoInstallInfo, InvalidBuildConfig] @'[BuildFailed] (BuildFailed $ fromGHCupPath workdir) $ do
       let tmpInstallDir = fromGHCupPath workdir </> "out"
       liftIO $ createDirRecursive' tmpInstallDir
 
@@ -402,6 +402,7 @@
                 , MalformedInstallInfo
                 , NoInstallInfo
                 , ProcessError
+                , InvalidBuildConfig
                 ] m ()
   addAdHocBinaries mMetadata toolDesc workdir installDest tmpInstallDest VersionRev{..} forceInstall = do
     let tver = mkTVer _vrVersion
diff --git a/lib/GHCup/Command/Install.hs b/lib/GHCup/Command/Install.hs
--- a/lib/GHCup/Command/Install.hs
+++ b/lib/GHCup/Command/Install.hs
@@ -87,6 +87,7 @@
         , DirNotEmpty
         , UninstallFailed
         , MalformedInstallInfo
+        , InvalidBuildConfig
         ]
        m
        (InstallationSpecResolved, FilePath)
@@ -143,6 +144,7 @@
         , DirNotEmpty
         , UninstallFailed
         , MalformedInstallInfo
+        , InvalidBuildConfig
         ]
        m
        (InstallationSpecResolved, FilePath)
@@ -214,6 +216,7 @@
               , ArchiveResult
               , NoInstallInfo
               , MalformedInstallInfo
+              , InvalidBuildConfig
               ] m InstallationSpecResolved
 installPackedBindist tool toolDesc dl dlInfo inst trev forceInstall extraArgs installTargets = do
   PlatformRequest {..} <- lift getPlatformReq
@@ -261,6 +264,7 @@
               , ParseError
               , NoInstallInfo
               , MalformedInstallInfo
+              , InvalidBuildConfig
               ] m InstallationSpecResolved
 installUnpackedBindist tool toolDesc workdir installDest tmpInstallDest dlInfo trev@(TargetVersionRev tver _rev) forceInstall extraArgs installTargets = do
   instSpec <- liftE $ installationSpecFromMetadata' dlInfo tool tver
diff --git a/lib/GHCup/Command/Install/LowLevel.hs b/lib/GHCup/Command/Install/LowLevel.hs
--- a/lib/GHCup/Command/Install/LowLevel.hs
+++ b/lib/GHCup/Command/Install/LowLevel.hs
@@ -98,6 +98,7 @@
               , ProcessError
               , ParseError
               , MalformedInstallInfo
+              , InvalidBuildConfig
               ] m ()
 installTheSpec InstallationSpec{..} workdir installDest tmpInstallDest extraArgs installTargets forceInstall = do
   -- run configure first
@@ -106,8 +107,10 @@
       addConfArgs <- lift $ sanitizefConfOptions extraArgs
 
       let configFile = fromMaybe "configure" _csConfigFile
-      processedConfArgs <- forM _csConfigArgs $ \a -> either (throwE . ParseError . show) pure . parseDomain $ a
-      newEnv <- forM _csConfigEnv $ \EnvSpec{..} -> liftIO (augmentEnvironment _esEnv _esUnion)
+      processedConfArgs <- forM _csConfigArgs $ \a -> throwOnParseError . parseDomain $ a
+      newEnv <- forM _csConfigEnv $ \EnvSpec{..} -> do
+        processedEnv <- throwOnParseError $ forM _esEnv (\(var, val) -> (var,) <$> parseDomain val)
+        liftIO (augmentEnvironment processedEnv _esUnion)
       liftE $ execWithWrapper "sh"
                        (("." Posix.</> configFile) : processedConfArgs <> addConfArgs
                        )
@@ -119,8 +122,19 @@
   -- then make
   case _isMake of
     Just MakeSpec{..} -> do
-      processedMakeArgs <- either (throwE . ParseError . show) pure $ forM (fromMaybe _msMakeArgs installTargets) parseDomain
-      newEnv <- forM _msMakeEnv $ \EnvSpec{..} -> liftIO (augmentEnvironment _esEnv _esUnion)
+      processedMakeArgs <- case installTargets of
+        Just it -> do
+          -- we need to check whether applying 'installTargets' would wipe out PREFIX/DESTDIR
+          origArgs <- throwOnParseError $ forM _msMakeArgs parseDomain
+          if origArgs /= _msMakeArgs
+          then throwE $ InvalidBuildConfig $ "Can't overwrite install targets " <> T.pack (show _msMakeArgs) <> " since they contain domain variables."
+          else throwOnParseError $ forM it parseDomain
+        Nothing ->
+          throwOnParseError $ forM _msMakeArgs parseDomain
+
+      newEnv <- forM _msMakeEnv $ \EnvSpec{..} -> do
+        processedEnv <- throwOnParseError $ forM _esEnv (\(var, val) -> (var,) <$> parseDomain val)
+        liftIO (augmentEnvironment processedEnv _esUnion)
       liftE $ makeWithWrapper processedMakeArgs (Just workdir) "make" newEnv
     _ -> pure ()
 
@@ -153,6 +167,8 @@
     pure into
 
   parseDomain = MP.parse domainParser ""
+
+  throwOnParseError = either (throwE . ParseError . show) pure
 
   domainParser :: MP.Parsec Void String String
   domainParser = concat <$> many anyOrKnownVars
diff --git a/lib/GHCup/Types.hs b/lib/GHCup/Types.hs
--- a/lib/GHCup/Types.hs
+++ b/lib/GHCup/Types.hs
@@ -509,8 +509,8 @@
     , _csConfigFile = Just "configure"
     }
   , _isMake = Just MakeSpec {
-      _msMakeArgs   = ["DESTDIR=${TMPDIR}", "install"]
-    , _msMakeEnv    = Nothing
+      _msMakeArgs   = ["install"]
+    , _msMakeEnv    = Just $ EnvSpec [("DESTDIR", "${TMPDIR}")] PreferSpec
     }
   , _isPreserveMtimes = True
   , _isExeSymLinked = defaultGHCExeSymLinked pfreq tver (ghcBinaries pfreq tver)
@@ -546,8 +546,8 @@
   , _isDataRules = []
   , _isConfigure = Nothing
   , _isMake = Just MakeSpec {
-      _msMakeArgs   = ["DESTDIR=${TMPDIR}", "PREFIX=${PREFIX}", "install"]
-    , _msMakeEnv    = Nothing
+      _msMakeArgs   = ["install"]
+    , _msMakeEnv    = Just $ EnvSpec [("DESTDIR", "${TMPDIR}"), ("PREFIX", "${PREFIX}")] PreferSpec
     }
   , _isPreserveMtimes = False
   , _isExeSymLinked = [] -- we can't figure it out
diff --git a/scripts/bootstrap/bootstrap-haskell b/scripts/bootstrap/bootstrap-haskell
--- a/scripts/bootstrap/bootstrap-haskell
+++ b/scripts/bootstrap/bootstrap-haskell
@@ -41,7 +41,7 @@
 
 plat="$(uname -s)"
 arch=$(uname -m)
-ghver="0.2.2.0"
+ghver="0.2.3.0"
 : "${GHCUP_BASE_URL:=https://downloads.haskell.org/~ghcup}"
 
 export GHCUP_SKIP_UPDATE_CHECK=yes
