File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -319,7 +319,7 @@ pub fn cmd_dot(opt: GlobalOptions, args: []const []const u8) !u8 {
319319 \\
320320 \\usage: zigpkg dot {--help|build_root_path|--} [zig args]
321321 \\
322- \\rerun "zig build" and output a graphviz ".dot" file of all build steps
322+ \\rerun "zig build" and output a graphviz ".dot" file of build steps based on args
323323 \\
324324 \\
325325 ;
@@ -346,10 +346,21 @@ pub fn cmd_dot(opt: GlobalOptions, args: []const []const u8) !u8 {
346346}
347347
348348pub fn cmd_dotall (opt : GlobalOptions , args : []const []const u8 ) ! u8 {
349+ const cmd_usage =
350+ \\
351+ \\usage: zigpkg dotall {--help|build_root_path|--} [zig args]
352+ \\
353+ \\rerun "zig build" and output a graphviz ".dot" file of all build steps
354+ \\
355+ \\
356+ ;
349357 var arg_sep : usize = 0 ;
350358 var root : []const u8 = "." ;
351359 for (args ) | arg | {
352- if (std .mem .eql (u8 , arg , "--" )) {
360+ if (helpArg (&.{arg })) {
361+ try opt .stdout .writeAll (cmd_usage );
362+ return std .process .exit (0 );
363+ } else if (std .mem .eql (u8 , arg , "--" )) {
353364 arg_sep += 1 ;
354365 break ;
355366 } else if (arg_sep == 0 ) {
You can’t perform that action at this time.
0 commit comments