From b43ee05f4e99bfe8b834d3c37508bbf00f5df539 Mon Sep 17 00:00:00 2001 From: hacker1024 Date: Thu, 18 Jan 2024 10:15:35 +1100 Subject: dartHooks.dartInstallHook: Allow disabling cache installation independently --- .../build-dart-application/hooks/dart-install-hook.sh | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'pkgs') diff --git a/pkgs/build-support/dart/build-dart-application/hooks/dart-install-hook.sh b/pkgs/build-support/dart/build-dart-application/hooks/dart-install-hook.sh index 888e12a07d83..fbaee6bc1d7a 100644 --- a/pkgs/build-support/dart/build-dart-application/hooks/dart-install-hook.sh +++ b/pkgs/build-support/dart/build-dart-application/hooks/dart-install-hook.sh @@ -19,15 +19,25 @@ dartInstallHook() { fi done < <(_getDartEntryPoints) + runHook postInstall + + echo "Finished dartInstallHook" +} + +dartInstallCacheHook() { + echo "Executing dartInstallCacheHook" + # Install the package_config.json file. mkdir -p "$pubcache" cp .dart_tool/package_config.json "$pubcache/package_config.json" - runHook postInstall - - echo "Finished dartInstallHook" + echo "Finished dartInstallCacheHook" } if [ -z "${dontDartInstall-}" ] && [ -z "${installPhase-}" ]; then installPhase=dartInstallHook fi + +if [ -z "${dontDartInstallCache-}" ]; then + postInstallHooks+=(dartInstallCacheHook) +fi \ No newline at end of file -- cgit 1.4.1