@@ -37,31 +37,30 @@ func NewBootstrapCmd() *cobra.Command {
37
37
bootstrapCmd := & cobra.Command {
38
38
Use : "bootstrap" ,
39
39
Short : "Bootstraps all configured snowblocks" ,
40
+ Long : `Bootstraps all configured snowblocks
41
+ To process individual snowblocks a list of space-separated paths can be passed as arguments.
42
+ ` ,
40
43
Run : func (cmd * cobra.Command , args []string ) {
41
44
o .prepare (cmd , args )
42
45
o .run (cmd , args )
43
46
},
44
47
}
45
-
46
- bootstrapCmd .Flags ().StringSliceVarP (
47
- & o .SnowblockPaths , "snowblocks" , "s" , []string {}, "comma-separated paths to individual snowblock directories" )
48
-
49
48
return bootstrapCmd
50
49
}
51
50
52
51
func (o * cmdOptions ) prepare (cmd * cobra.Command , args []string ) {
53
52
// Use explicit snowblocks if specified, otherwise find all snowblocks within the base directories.
54
- if len (o . SnowblockPaths ) > 0 {
53
+ if len (args ) > 0 {
55
54
prt .Debugf ("Using individual snowblocks instead of configured base directories(s): %s" ,
56
- color .CyanString ("%v" , o . SnowblockPaths ))
57
- config .AppConfig .Snowblocks .Paths = o . SnowblockPaths
55
+ color .CyanString ("%v" , args ))
56
+ config .AppConfig .Snowblocks .Paths = args
58
57
} else {
59
58
if err := o .readSnowblockDirectories (); err != nil {
60
59
prt .Errorf ("Failed to read snowblocks from base directories: %v" , err )
61
60
os .Exit (1 )
62
61
}
63
- o .SnowblockPaths = config .AppConfig .Snowblocks .Paths
64
62
}
63
+ o .SnowblockPaths = config .AppConfig .Snowblocks .Paths
65
64
}
66
65
67
66
func (o * cmdOptions ) readSnowblockDirectories () error {
0 commit comments