File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -121,15 +121,16 @@ echo
121121cd " $REPO_ROOT " || exit 1
122122
123123# If a repo has it's own action lint config, use that. Otherwise, use the one in this repo.
124+ # Note: we've already cd'd into $REPO_ROOT above, so use paths relative to cwd.
124125CONFIG=" "
125- if [[ ! -f " $REPO_ROOT / .github/actionlint.yml" ]] && [[ ! -f " $REPO_ROOT / .github/actionlint.yaml" ]]; then
126+ if [[ ! -f " .github/actionlint.yml" ]] && [[ ! -f " .github/actionlint.yaml" ]]; then
126127 CONFIG=" -config-file $( readlink -f " $SCRIPT_DIR " /../.github/actionlint.yml) "
127128 info " Using default Github-Actions repo actionlint.yml" >&2
128- else
129- if [[ -f " $REPO_ROOT / .github/actionlint.yml" ]]; then
130- CONFIG=" -config-file $( readlink -f " $REPO_ROOT / .github/actionlint.yml" ) "
131- elif [[ -f " $REPO_ROOT / .github/actionlint.yaml" ]]; then
132- CONFIG=" -config-file $( readlink -f " $REPO_ROOT / .github/actionlint.yaml" ) "
129+ else
130+ if [[ -f " .github/actionlint.yml" ]]; then
131+ CONFIG=" -config-file $( readlink -f " .github/actionlint.yml" ) "
132+ elif [[ -f " .github/actionlint.yaml" ]]; then
133+ CONFIG=" -config-file $( readlink -f " .github/actionlint.yaml" ) "
133134 else
134135 error " Should be unreachable -- previously found a valid local actionlint but cannot find it now..."
135136 exit 1
You can’t perform that action at this time.
0 commit comments