Fix canonicalize-flags to inherit options from query. This is a patch to support the request for canonicalize-flags to support starlark options.
PiperOrigin-RevId: 302960063
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/commands/CanonicalizeCommand.java b/src/main/java/com/google/devtools/build/lib/runtime/commands/CanonicalizeCommand.java
index e035988..c18777e 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/commands/CanonicalizeCommand.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/commands/CanonicalizeCommand.java
@@ -45,6 +45,8 @@
@Command(
name = "canonicalize-flags",
options = {CanonicalizeCommand.Options.class, PackageCacheOptions.class},
+ // inherits from query to get proper package loading options.
+ inherits = {QueryCommand.class},
allowResidue = true,
mustRunInWorkspace = false,
shortDescription = "Canonicalizes a list of %{product} options.",