dartHooks.dartInstallHook: Allow disabling cache installation independently
This commit is contained in:
@@ -19,15 +19,25 @@ dartInstallHook() {
|
||||
fi
|
||||
done < <(_getDartEntryPoints)
|
||||
|
||||
# Install the package_config.json file.
|
||||
mkdir -p "$pubcache"
|
||||
cp .dart_tool/package_config.json "$pubcache/package_config.json"
|
||||
|
||||
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"
|
||||
|
||||
echo "Finished dartInstallCacheHook"
|
||||
}
|
||||
|
||||
if [ -z "${dontDartInstall-}" ] && [ -z "${installPhase-}" ]; then
|
||||
installPhase=dartInstallHook
|
||||
fi
|
||||
|
||||
if [ -z "${dontDartInstallCache-}" ]; then
|
||||
postInstallHooks+=(dartInstallCacheHook)
|
||||
fi
|
||||
Reference in New Issue
Block a user