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

Find Dir: Duplicate directories #135

Open
tarqd opened this issue Jun 4, 2024 · 0 comments
Open

Find Dir: Duplicate directories #135

tarqd opened this issue Jun 4, 2024 · 0 comments

Comments

@tarqd
Copy link

tarqd commented Jun 4, 2024

The uniq command expects the input to be sorted in this command

find "${INPUT_FIND_DIR}" -name '*.tf' -exec dirname {} \; | uniq

Should be

find "${INPUT_FIND_DIR}" -name '*.tf' -exec dirname {} \; | sort | uniq

Current output:

.
./roles/app-management
./roles/flag-lifecycle
./roles/project-administration
./roles/admin
.
./integrations/audit-log-subscription/dynatrace
./integrations/audit-log-subscription/signalfx
./integrations/audit-log-subscription/elastic
./integrations/audit-log-subscription/grafana
./integrations/audit-log-subscription/msteams
./integrations/audit-log-subscription/honeycomb
./integrations/audit-log-subscription/cloudtrail
./integrations/audit-log-subscription/logdna
./integrations/audit-log-subscription/newrelic-apm
./integrations/audit-log-subscription/splunk
./integrations/audit-log-subscription/datadog
.
./examples/integrations
.

Expected output

.
./examples/integrations
./integrations/audit-log-subscription/cloudtrail
./integrations/audit-log-subscription/datadog
./integrations/audit-log-subscription/dynatrace
./integrations/audit-log-subscription/elastic
./integrations/audit-log-subscription/grafana
./integrations/audit-log-subscription/honeycomb
./integrations/audit-log-subscription/logdna
./integrations/audit-log-subscription/msteams
./integrations/audit-log-subscription/newrelic-apm
./integrations/audit-log-subscription/signalfx
./integrations/audit-log-subscription/splunk
./roles/admin
./roles/app-management
./roles/flag-lifecycle
./roles/project-administration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant