Skip to content

Commit

Permalink
fix: make sure we pass along a relative file path (#123)
Browse files Browse the repository at this point in the history
  • Loading branch information
SamTealeDrest authored Mar 4, 2022
1 parent b8ff8f5 commit 652fae3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 3 additions & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { parse, resolve } from 'path'
import { parse } from 'path'
import { context, getOctokit } from '@actions/github'
import {
PullRequestEvent,
Expand Down Expand Up @@ -67,7 +67,9 @@ export function getModulePaths<T extends Record<string, unknown>>(
if (ext === '.tf' || base === '.terraform.lock.hcl') {
paths.push(dir)
} else if (ext.match(/ya?ml/) !== null || ext === '.tpl') {
paths.push(resolve(dir, '..'))
const splitPath = dir.split('/')
splitPath.pop()
paths.push(splitPath.join('/'))
}
return paths
}, [])
Expand Down

0 comments on commit 652fae3

Please sign in to comment.