File tree 1 file changed +6
-7
lines changed
1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,6 @@ class Publish extends BaseCommand {
55
55
const json = this . npm . config . get ( 'json' )
56
56
const defaultTag = this . npm . config . get ( 'tag' )
57
57
const ignoreScripts = this . npm . config . get ( 'ignore-scripts' )
58
- const silent = log . level === 'silent'
59
58
60
59
if ( semver . validRange ( defaultTag ) ) {
61
60
throw new Error ( 'Tag name must not be a valid SemVer range: ' + defaultTag . trim ( ) )
@@ -79,7 +78,7 @@ class Publish extends BaseCommand {
79
78
path : spec . fetchSpec ,
80
79
stdio : 'inherit' ,
81
80
pkg : manifest ,
82
- banner : ! silent ,
81
+ banner : ! opts . silent ,
83
82
} )
84
83
}
85
84
@@ -123,22 +122,22 @@ class Publish extends BaseCommand {
123
122
path : spec . fetchSpec ,
124
123
stdio : 'inherit' ,
125
124
pkg : manifest ,
126
- banner : ! silent ,
125
+ banner : ! opts . silent ,
127
126
} )
128
127
129
128
await runScript ( {
130
129
event : 'postpublish' ,
131
130
path : spec . fetchSpec ,
132
131
stdio : 'inherit' ,
133
132
pkg : manifest ,
134
- banner : ! silent ,
133
+ banner : ! opts . silent ,
135
134
} )
136
135
}
137
136
138
137
if ( ! this . suppressOutput ) {
139
- if ( ! silent && json ) {
138
+ if ( ! opts . silent && json ) {
140
139
this . npm . output ( JSON . stringify ( pkgContents , null , 2 ) )
141
- } else if ( ! silent ) {
140
+ } else if ( ! opts . silent ) {
142
141
this . npm . output ( `+ ${ pkgContents . id } ` )
143
142
}
144
143
}
@@ -152,7 +151,7 @@ class Publish extends BaseCommand {
152
151
153
152
const results = { }
154
153
const json = this . npm . config . get ( 'json' )
155
- const silent = log . level === 'silent'
154
+ const silent = this . npm . flatOptions . silent === 'silent'
156
155
const noop = a => a
157
156
const color = this . npm . color ? chalk : { green : noop , bold : noop }
158
157
await this . setWorkspaces ( filters )
You can’t perform that action at this time.
0 commit comments