+9
-0
lines changedFilter options
+9
-0
lines changed Original file line number Diff line number Diff line change
@@ -6,6 +6,7 @@
6
6
over verbose mode.
7
7
* Compute checksum of global and ACL files
8
8
* Encrypt and decrypt produced files
9
+
* Ensure jobs option is greater than or equal to
9
10
10
11
## pg_back 2.0.1
11
12
Original file line number Diff line number Diff line change
@@ -289,6 +289,10 @@ func parseCli(args []string) (options, []string, error) {
289
289
return opts, changed, fmt.Errorf("compression level must be in range 0..9")
290
290
}
291
291
292
+
if opts.Jobs < 1 {
293
+
return opts, changed, fmt.Errorf("concurrent jobs (-j) cannot be less than 1")
294
+
}
295
+
292
296
if err := validateDumpFormat(format); err != nil {
293
297
return opts, changed, err
294
298
}
@@ -378,6 +382,10 @@ func loadConfigurationFile(path string) (options, error) {
378
382
return opts, fmt.Errorf("compression level must be in range 0..9")
379
383
}
380
384
385
+
if opts.Jobs < 1 {
386
+
return opts, fmt.Errorf("jobs cannot be less than 1")
387
+
}
388
+
381
389
if err := validateDumpFormat(format); err != nil {
382
390
return opts, err
383
391
}
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4