UNPKG

@storm-software/git-tools

Version:

Tools for managing Git repositories within a Nx workspace.

36 lines (33 loc) 1.25 kB
#!/usr/bin/env node 'use strict'; var chunkSWXHQXUT_cjs = require('./chunk-SWXHQXUT.cjs'); var chunkCIJVSMK2_cjs = require('./chunk-CIJVSMK2.cjs'); var chunkOYO5BO7W_cjs = require('./chunk-OYO5BO7W.cjs'); // bin/post-checkout.ts void (async () => { const config = await chunkOYO5BO7W_cjs.getConfig(); try { chunkOYO5BO7W_cjs.handleProcess(config); chunkOYO5BO7W_cjs.writeInfo("Running post-checkout hook...", config); chunkSWXHQXUT_cjs.checkPackageVersion(process.argv?.slice(1)); try { chunkCIJVSMK2_cjs.run(config, "git-lfs version"); } catch (error) { chunkOYO5BO7W_cjs.writeError( `This repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/post-checkout. Error: ${error?.message}`, config ); chunkOYO5BO7W_cjs.exitWithError(config); } chunkCIJVSMK2_cjs.run(config, "git lfs post-checkout"); chunkOYO5BO7W_cjs.exitWithSuccess(config); } catch (error) { chunkOYO5BO7W_cjs.writeFatal( `A fatal error occurred while running the program: ${error.message}`, config ); chunkOYO5BO7W_cjs.exitWithError(config); process.exit(1); } })();