Skip to content

Commit

Permalink
test: fix git init call extra opts
Browse files Browse the repository at this point in the history
  • Loading branch information
ruyadorno committed Apr 9, 2021
1 parent 63b5c56 commit a7b0011
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/tap/git-npmignore.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ var rimraf = require('rimraf')
var test = require('tap').test
var which = require('which')

var GITHUB_ACTIONS = process.env.GITHUB_ACTIONS
var common = require('../common-tap.js')
var escapeArg = require('../../lib/utils/escape-arg.js')
var Tacks = require('tacks')
Expand Down Expand Up @@ -151,8 +152,9 @@ function setup (cb) {
if (er) return cb(er)

var git = escapeArg(gitPath)
var extraOpts = GITHUB_ACTIONS ? ' --initial-branch=main' : ''

exec(git + ' init --initial-branch=main', {cwd: dep}, init)
exec(git + ' init' + extraOpts, {cwd: dep}, init)

function init (er, _, stderr) {
if (er) return cb(er)
Expand Down

0 comments on commit a7b0011

Please sign in to comment.