diff --git a/infra/base-images/base-builder/indexer/manifest_types.py b/infra/base-images/base-builder/indexer/manifest_types.py index ad201907e01c..b7fcaebe54d1 100644 --- a/infra/base-images/base-builder/indexer/manifest_types.py +++ b/infra/base-images/base-builder/indexer/manifest_types.py @@ -139,6 +139,12 @@ class BinaryConfig: binary_name: str + @property + def uses_stdin(self) -> bool: + """Whether the binary uses stdin.""" + del self + return False + @classmethod def from_dict(cls, config_dict: Mapping[str, Any]) -> Self: """Deserializes the correct `BinaryConfig` subclass from a dict.""" @@ -188,6 +194,11 @@ class CommandLineBinaryConfig(BinaryConfig): # some targets like V8 require this to be false, see b/433718862. filter_compile_commands: bool = True + @property + def uses_stdin(self) -> bool: + """Whether the binary uses stdin.""" + return manifest_constants.INPUT_FILE not in self.binary_args + @classmethod def from_dict(cls, config_dict: Mapping[str, Any]) -> Self: """Deserializes the `CommandLineBinaryConfig` from a dict."""