mirror of
https://github.com/zen-browser/surfer.git
synced 2025-07-07 17:05:33 +02:00
Merge pull request #15 from PeterCardenas/fix-commit-failing
fix: hard fail when committing fails
This commit is contained in:
commit
744f0e3260
1 changed files with 13 additions and 6 deletions
|
@ -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, dynamicConfig } from '../utils'
|
||||
import { config, configDispatch } from '../utils'
|
||||
|
||||
export const init = async (directory: Command | string): Promise<void> => {
|
||||
const cwd = process.cwd()
|
||||
|
@ -45,11 +45,6 @@ export const init = async (directory: Command | string): Promise<void> => {
|
|||
cwd: absoluteInitDirectory,
|
||||
})
|
||||
|
||||
await configDispatch('git', {
|
||||
args: ['init'],
|
||||
cwd: absoluteInitDirectory,
|
||||
})
|
||||
|
||||
await configDispatch('git', {
|
||||
args: ['checkout', '--orphan', version],
|
||||
cwd: absoluteInitDirectory,
|
||||
|
@ -60,11 +55,23 @@ export const init = async (directory: Command | string): Promise<void> => {
|
|||
cwd: absoluteInitDirectory,
|
||||
})
|
||||
|
||||
await configDispatch('git', {
|
||||
args: ['config', 'commit.gpgsign', 'false'],
|
||||
cwd: absoluteInitDirectory,
|
||||
})
|
||||
|
||||
await configDispatch('git', {
|
||||
args: ['config', 'core.safecrlf', 'false'],
|
||||
cwd: absoluteInitDirectory,
|
||||
})
|
||||
|
||||
log.info('Committing...')
|
||||
|
||||
await configDispatch('git', {
|
||||
args: ['commit', '-aqm', `"Firefox ${version}"`],
|
||||
cwd: absoluteInitDirectory,
|
||||
// Committing can fail for configuration issues: see https://github.com/zen-browser/desktop/issues/1877
|
||||
killOnError: true,
|
||||
})
|
||||
|
||||
await configDispatch('git', {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue