Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit002439e

Browse files
antongolubtravi
andauthored
fix: addpreferLocal option to allow execa to use local npm version (semantic-release#445)
Co-authored-by: Matt Travi <programmer@travi.org>
1 parent19761ed commit002439e

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

‎lib/add-channel.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ module.exports = async (npmrc, {npmPublish}, pkg, context) => {
2424
{
2525
cwd,
2626
env,
27+
preferLocal:true,
2728
}
2829
);
2930
result.stdout.pipe(stdout,{end:false});

‎lib/prepare.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ module.exports = async (npmrc, {tarballDir, pkgRoot}, {cwd, env, stdout, stderr,
2222

2323
if(tarballDir){
2424
logger.log('Creating npm package version %s',version);
25-
constpackResult=execa('npm',['pack',basePath,'--userconfig',npmrc],{cwd, env});
25+
constpackResult=execa('npm',['pack',basePath,'--userconfig',npmrc],{cwd, env,preferLocal:true});
2626
packResult.stdout.pipe(stdout,{end:false});
2727
packResult.stderr.pipe(stderr,{end:false});
2828

‎lib/publish.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ module.exports = async (npmrc, {npmPublish, pkgRoot}, pkg, context) => {
2323
constresult=execa(
2424
'npm',
2525
['publish',basePath,'--userconfig',npmrc,'--tag',distTag,'--registry',registry],
26-
{cwd, env}
26+
{cwd, env,preferLocal:true}
2727
);
2828
result.stdout.pipe(stdout,{end:false});
2929
result.stderr.pipe(stderr,{end:false});

‎lib/verify-auth.js‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ module.exports = async (npmrc, pkg, context) => {
1818

1919
if(normalizeUrl(registry)===normalizeUrl(DEFAULT_NPM_REGISTRY)){
2020
try{
21-
constwhoamiResult=execa('npm',['whoami','--userconfig',npmrc,'--registry',registry],{cwd, env});
21+
constwhoamiResult=execa('npm',['whoami','--userconfig',npmrc,'--registry',registry],{
22+
cwd,
23+
env,
24+
preferLocal:true,
25+
});
2226
whoamiResult.stdout.pipe(stdout,{end:false});
2327
whoamiResult.stderr.pipe(stderr,{end:false});
2428
awaitwhoamiResult;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp