]> wimlib.net Git - wimlib/blobdiff - programs/imagex.c
Don't require image num/name when applying from single-image pipable WIM
[wimlib] / programs / imagex.c
index b4e3b540d391ff30d67d16f21aa567dc843bcae4..8947c56dfb1674857c9728d4a585c93beffabe36 100644 (file)
@@ -1514,14 +1514,13 @@ imagex_apply(int argc, tchar **argv, int cmd)
 
        if (!tstrcmp(wimfile, T("-"))) {
                /* Attempt to apply pipable WIM from standard input.  */
-               if (argc < 3) {
-                       imagex_error(T("Imagex index or name must be explicitly "
-                                      "specified when applying pipable WIM on "
-                                      "standard input."));
-                       goto out_usage;
+               if (argc == 2) {
+                       image_num_or_name = NULL;
+                       target = argv[1];
+               } else {
+                       image_num_or_name = argv[1];
+                       target = argv[2];
                }
-               image_num_or_name = argv[1];
-               target = argv[2];
                wim = NULL;
                num_additional_swms = 0;
                additional_swms = NULL;