Returns the path to the directory containing the CargoLambda.toml configuration file. If the file exists at the root level, returns the root path. Otherwise returns the template subdirectory path.
(&self)
| 158 | /// If the file exists at the root level, returns the root path. |
| 159 | /// Otherwise returns the template subdirectory path. |
| 160 | pub(crate) fn config_path(&self) -> PathBuf { |
| 161 | let path = self.path(); |
| 162 | let config = path.join("CargoLambda.toml"); |
| 163 | if config.exists() && config.is_file() { |
| 164 | return path.to_path_buf(); |
| 165 | } |
| 166 | |
| 167 | Self::template_path(path) |
| 168 | } |
| 169 | |
| 170 | /// Returns the path to the template subdirectory if it exists. |
| 171 | /// Otherwise returns the root path. |