|
10 | 10 | // Import LIBS |
11 | 11 | const fs = require('fs'), |
12 | 12 | path = require('path'), |
13 | | - { execSync } = require('child_process') |
| 13 | + { execSync, spawnSync } = require('child_process') |
14 | 14 |
|
15 | 15 | // Init CACHE vars |
16 | 16 | const cache = { mode: process.argv.includes('--cache'), paths: { root: '.cache/' }} |
|
60 | 60 | if (!chromiumOnly && !ffOnly) { |
61 | 61 | console.log(`Checking last commit details for ${platformManifestPath}...`) |
62 | 62 | try { |
63 | | - const latestCommitMsg = execSync( |
64 | | - `git log -1 --format=%s -- "${path.relative(process.cwd(), path.dirname(manifestPath))}"`, |
65 | | - { encoding: 'utf8', shell: true } |
66 | | - ).trim() |
| 63 | + const latestCommitMsg = spawnSync('git', |
| 64 | + ['log', '-1', '--format=%s', '--', path.relative(process.cwd(), path.dirname(manifestPath))], |
| 65 | + { encoding: 'utf8' } |
| 66 | + ).stdout.trim() |
67 | 67 | bump.log.hash(`${latestCommitMsg}\n`) |
68 | 68 | if (/bump.*(?:ersion|manifest)/i.test(latestCommitMsg)) { |
69 | 69 | console.log('No changes found. Skipping...\n') ; continue } |
|
96 | 96 | // git add/commit/push |
97 | 97 | try { |
98 | 98 | execSync('git add ./**/manifest.json') |
99 | | - execSync('git', ['commit', '-n', '-m', commitMsg], { stdio: 'inherit', encoding: 'utf-8' }) |
| 99 | + spawnSync('git', ['commit', '-n', '-m', commitMsg], { stdio: 'inherit', encoding: 'utf-8' }) |
100 | 100 | if (!noPush) { |
101 | 101 | bump.log.working('\nPulling latest changes from remote to sync local repository...\n') |
102 | 102 | execSync('git pull') |
|
0 commit comments