commit:     a1ac6064a31de6e6f2d7fd113fd6da9c847df247
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 29 17:39:00 2025 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Nov 29 17:39:00 2025 +0000
URL:        https://gitweb.gentoo.org/proj/steve.git/commit/?id=a1ac6064

Fix specifying --min-jobs with automatic --jobs

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 steve.cxx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/steve.cxx b/steve.cxx
index eb2c6f4..37dcd69 100644
--- a/steve.cxx
+++ b/steve.cxx
@@ -595,6 +595,8 @@ int main(int argc, char **argv)
                return 1;
        }
 
+       if (state.jobs == 0)
+               state.jobs = sysconf(_SC_NPROCESSORS_ONLN);
        if (state.min_jobs > state.jobs) {
                std::print(stderr, "--min-jobs ({}) must be smaller than --jobs 
({})\n",
                                state.min_jobs, state.jobs);
@@ -621,8 +623,6 @@ int main(int argc, char **argv)
        struct cuse_info ci{};
        ci.dev_info_argc = 1;
        ci.dev_info_argv = dev_info_argv;
-       if (state.jobs == 0)
-               state.jobs = sysconf(_SC_NPROCESSORS_ONLN);
 
        struct fuse_args args = FUSE_ARGS_INIT(0, nullptr);
        std::unique_ptr<struct fuse_args, std::function<void(struct 
fuse_args*)>>

Reply via email to