We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 63b5c56 commit a7b0011Copy full SHA for a7b0011
test/tap/git-npmignore.js
@@ -7,6 +7,7 @@ var rimraf = require('rimraf')
7
var test = require('tap').test
8
var which = require('which')
9
10
+var GITHUB_ACTIONS = process.env.GITHUB_ACTIONS
11
var common = require('../common-tap.js')
12
var escapeArg = require('../../lib/utils/escape-arg.js')
13
var Tacks = require('tacks')
@@ -151,8 +152,9 @@ function setup (cb) {
151
152
if (er) return cb(er)
153
154
var git = escapeArg(gitPath)
155
+ var extraOpts = GITHUB_ACTIONS ? ' --initial-branch=main' : ''
156
- exec(git + ' init --initial-branch=main', {cwd: dep}, init)
157
+ exec(git + ' init' + extraOpts, {cwd: dep}, init)
158
159
function init (er, _, stderr) {
160
0 commit comments