Skip to content

Commit 81ea7fd

Browse files
committed
test: allow file protocol in git submodule test
1 parent 3ea9b7e commit 81ea7fd

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

test/integration/git-submodules.test.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,17 @@ describe('lint-staged', () => {
2929
await execGit(['commit', '-m initial commit'], { cwd: submoduleDir })
3030

3131
// Add the newly-created repo as a submodule in a new path.
32-
// This simulates adding it from a remote
33-
await execGit(['submodule', 'add', '--force', './submodule-temp', './submodule'])
32+
// This simulates adding it from a remote. By default file protocol is not allowed,
33+
// see https://git-scm.com/docs/git-config#Documentation/git-config.txt-protocolallow
34+
await execGit([
35+
'-c',
36+
'protocol.file.allow=always',
37+
'submodule',
38+
'add',
39+
'--force',
40+
'./submodule-temp',
41+
'./submodule',
42+
])
3443
submoduleDir = path.resolve(cwd, 'submodule')
3544
// Set these again for Windows git in CI
3645
await execGit(['config', 'user.name', '"test"'], { cwd: submoduleDir })

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy