private function modifyScripts($scripts)
    {
        $updateScripts = (array) $scripts[ScriptEvents::POST_UPDATE_CMD];

        $index = array_search(ScriptHandler::class . '::installAssets', $updateScripts) ?: 0;
        array_splice($updateScripts, $index, 1, [ScriptHandler::class . '::updateProject', ScriptHandler::class . '::installAssets']);

        $scripts[ScriptEvents::POST_UPDATE_CMD] = $updateScripts;

        return $scripts;
    }