Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed missing PS resources #355

Merged
merged 2 commits into from
Mar 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions dsc/src/subcommand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -408,10 +408,7 @@ pub fn resource(subcommand: &ResourceSubCommand, stdin: &Option<String>) {
for resource in dsc.list_available_resources(&resource_name.clone().unwrap_or_default()) {
let mut methods = "g---".to_string();
// if description, tags, or write_table is specified, pull resource manifest if it exists
if description.is_some() || tags.is_some() || write_table {
let Some(ref resource_manifest) = resource.manifest else {
continue;
};
if let Some(ref resource_manifest) = resource.manifest {
let manifest = match import_manifest(resource_manifest.clone()) {
Ok(resource_manifest) => resource_manifest,
Err(err) => {
Expand Down Expand Up @@ -445,6 +442,11 @@ pub fn resource(subcommand: &ResourceSubCommand, stdin: &Option<String>) {
if manifest.set.is_some() { methods.replace_range(1..2, "s"); }
if manifest.test.is_some() { methods.replace_range(2..3, "t"); }
if manifest.export.is_some() { methods.replace_range(3..4, "e"); }
} else {
// resource does not have a manifest but filtering on description or tags was requested - skip such resource
if description.is_some() || tags.is_some() {
continue;
}
}

if write_table {
Expand Down
Loading