File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -87,10 +87,19 @@ const main = async (opts) => {
8787 table . push ( [ publish . name , publish . version , publish . tag ] )
8888 }
8989
90- const prompt = `Ready to publish the following packages:\n${ table . toString ( ) } \nOk to proceed? `
91- const confirm = await read ( { prompt, default : 'y' } )
92- if ( confirm . trim ( ) . toLowerCase ( ) . charAt ( 0 ) !== 'y' ) {
93- throw new Error ( 'Aborted' )
90+ const confirmMessage = [
91+ `Ready to ${ packOnly ? 'pack' : 'publish' } the following packages:` ,
92+ table . toString ( ) ,
93+ packOnly ? null : 'Ok to proceed? ' ,
94+ ] . filter ( Boolean ) . join ( '\n' )
95+
96+ if ( packOnly ) {
97+ log . info ( confirmMessage )
98+ } else {
99+ const confirm = await read ( { prompt : confirmMessage , default : 'y' } )
100+ if ( confirm . trim ( ) . toLowerCase ( ) . charAt ( 0 ) !== 'y' ) {
101+ throw new Error ( 'Aborted' )
102+ }
94103 }
95104
96105 await git ( 'clean' , '-fd' )
You can’t perform that action at this time.
0 commit comments