Expand description
This crate provides utilities for building, running, and managing external commands within the Cloud Terrastodon project. It includes features for:
- Specifying different command kinds (Azure CLI, Terraform, VSCode, Echo, Pwsh).
- Building command arguments and environment variables.
- Handling file arguments for commands like Azure CLI.
- Configuring output behavior (capture or display).
- Implementing retry logic for authentication failures.
- Caching command output for improved performance.
- Sending content to command stdin.
- Writing command failures and successes to files for debugging and caching.
Re-exports§
pub use bstr;
Modules§
Macros§
- impl_
cacheable_ into_ future - Implement
IntoFutureandCacheInvalidatableIntoFuturefor a concreteCacheableCommandtype without repeating boilerplate.
Structs§
Enums§
Constants§
Traits§
- Cache
Invalidatable - Cache
Invalidatable Into Future - Cacheable
Command - Convenience trait for implementing commands that can be cached.
This command gives
HasCacheKeyand [InvalidatableCommand] implementations. - From
Command Output - HasCache
Key - NoSpaces
- Path
Mapper
Functions§
- discover_
caches - Walk the provided commands directory and discover cache entries by locating
timestamp.txtfiles. For each foundtimestamp.txtwe parse the last line as the most-recently-used timestamp and return a vector of (CacheKey, DateTime) sorted by most-recently-used first.