Push noProfileHack handling to bash

Gets rid of the last string substitution.
This commit is contained in:
Marien Zwart 2024-06-03 22:18:00 +10:00
parent 55f23cbfcf
commit 9f249ae72f
No known key found for this signature in database

View file

@ -307,7 +307,7 @@ let
# Force local build in case the user init.el does something weird.
doomProfile = runCommandLocal "doom-profile"
{
inherit doomDir doomIntermediates doomSource profileName runtimeShell;
inherit doomDir doomIntermediates doomSource noProfileHack profileName runtimeShell;
buildProfileLoader = ./build-helpers/build-profile-loader;
buildProfile = ./build-helpers/build-profile;
initEl = ./init.el;
@ -342,7 +342,7 @@ let
if [[ -n "$profileName" ]]; then
export DOOMPROFILELOADFILE=$out/loader/init.el
$runtimeShell $doomSource/bin/doomscript $buildProfileLoader \
-n "$profileName" -b "$out" ${optionalString noProfileHack "-u"}
''${noProfileHack:+-u} -n "$profileName" -b "$out"
# With DOOMPROFILE set, doom-state-dir and friends are HOME-relative.
export HOME=$(mktemp -d)