dartHooks.dartInstallHook: Allow disabling cache installation independently
This commit is contained in:
parent
196a0a5b2d
commit
b43ee05f4e
1 changed files with 14 additions and 4 deletions
|
@ -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
|
Loading…
Reference in a new issue