File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
tw/pkg/commands/bumpconstraints Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 55 description : Path to the constraints file to update
66 default : constraints.txt
77 packages :
8- description : List of package==version pairs to update (newline separated, with optional comments)
8+ description : |
9+ List of package==version pairs to update (newline separated, with optional comments)
10+ Use the string '# future-updates' as a placeholder.
911 required : true
1012 only-replace :
1113 description : Only update packages already in the constraints file (set to false to allow adding new packages)
Original file line number Diff line number Diff line change @@ -104,7 +104,13 @@ func (c *cfg) Run(cmd *cobra.Command) error {
104104
105105 // Check that we have updates to process
106106 if len (c .Packages ) == 0 {
107- return fmt .Errorf ("no package updates specified (provide as arguments or use -u/--updates-file)" )
107+ contents , err := os .ReadFile (c .UpdatesFile )
108+ placeholder := "# future-updates"
109+ if err == nil && strings .TrimSpace (string (contents )) == placeholder {
110+ log .InfoContextf (ctx , "Constraints file is intentionally empty" )
111+ } else {
112+ return fmt .Errorf ("no package updates specified (provide as arguments or use -u/--updates-file). Use string '%s' as placeholder" , placeholder )
113+ }
108114 }
109115
110116 // Parse package updates from arguments
You can’t perform that action at this time.
0 commit comments