bump version to 1.9.5 and add branding check to prevent git initialization for official builds
Some checks are pending
CI / general (push) Waiting to run

This commit is contained in:
mr. m 2025-01-08 10:21:51 +00:00
parent c3a4290d66
commit d63530a4ff
3 changed files with 1226 additions and 781 deletions

View file

@ -6,7 +6,7 @@ import { existsSync, readFileSync } from 'node:fs'
import { resolve } from 'node:path'
import { bin_name } from '..'
import { log } from '../log'
import { config, configDispatch } from '../utils'
import { config, configDispatch, dynamicConfig } from '../utils'
export const init = async (directory: Command | string): Promise<void> => {
const cwd = process.cwd()
@ -36,6 +36,12 @@ export const init = async (directory: Command | string): Promise<void> => {
version = version.trim().replace(/\\n/g, '')
const brandingKey = dynamicConfig.get('brand')
if (brandingKey !== 'unofficial') {
log.warning("NOT initializing git, as this is an official build");
return;
}
// TODO: Use bash on windows, this may significantly improve performance.
// Still needs testing though
log.info('Initializing git, this may take some time')