@@ -41,7 +41,8 @@ export default {
41
41
{ name : 'overwrite' , default : true , boolean : true } ,
42
42
{ name : 'delete' , default : true , boolean : true } ,
43
43
{ name : 'live' , default : false , boolean : true } ,
44
- { name : 'watch' , abbr : 'w' , default : false , boolean : true }
44
+ { name : 'watch' , abbr : 'w' , default : false , boolean : true } ,
45
+ { name : 'yes' , abbr : 'y' , default : false , boolean : true }
45
46
] ,
46
47
command : async function ( args ) {
47
48
if ( ! args . _ [ 0 ] ) throw new Error ( 'A source path or URL is required' )
@@ -53,10 +54,15 @@ export default {
53
54
console . error ( chalk . bold ( `Source: ${ leftArgs . raw } ` ) )
54
55
console . error ( chalk . bold ( `Target: ${ rightArgs . raw } ` ) )
55
56
56
- var ok = await yesno ( {
57
- question : `Begin sync? [y/N]` ,
58
- defaultValue : false
59
- } )
57
+ var ok = true
58
+
59
+ if ( ! args . yes ) {
60
+ ok = await yesno ( {
61
+ question : `Begin sync? [y/N]` ,
62
+ defaultValue : false
63
+ } )
64
+ }
65
+
60
66
if ( ! rightArgs . isHyper ) mkdirp . sync ( rightArgs . path )
61
67
if ( ! ok ) process . exit ( 0 )
62
68
console . error ( live ? 'Live syncing (Ctrl+c to exit)...' : 'Syncing...' )
0 commit comments