GoogleCloudPlatform / GoogleCloudPlatform/cloud-builders-community

Shellcheck: issues when passing glob for dir

Open
#326 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
1.3k
Forks
848
PR merge metrics
No merged PRs in 30d

Description

## Affected builder image

`gcr.io/cloud-builders-community/shellcheck`

## Expected Behavior

```shell
shellcheck ./**/*.sh
```

This should run `shellcheck` against all `.sh` scripts within the repo.

## Actual Behavior

It throws an error

```
Step #1 - "Shellcheck": ./**/*.sh: ./**/*.sh: openBinaryFile: does not exist (No such file or directory)
```

## Steps to Reproduce the Problem

1. use `./**/*.sh` as an `arg` in your `cloudbuild.yaml` for the `shellcheck` builder

## Additional Info

Even running the same param with `bash -c "shellcheck ./**/*.sh` is inconsistent.

The test and usage of the `shellcheck` builder should be updated to cover this scenario as it would be quite common

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.