mirror of
https://github.com/actions/github-script.git
synced 2025-12-08 08:06:23 +00:00
Update src/wrap-require.ts
Co-authored-by: Josh Gross <joshmgross@github.com>
This commit is contained in:
@@ -3,7 +3,7 @@ import * as path from 'path'
|
|||||||
export const wrapRequire = new Proxy(__non_webpack_require__, {
|
export const wrapRequire = new Proxy(__non_webpack_require__, {
|
||||||
apply: (target, thisArg, [moduleID]) => {
|
apply: (target, thisArg, [moduleID]) => {
|
||||||
if (moduleID.startsWith('.')) {
|
if (moduleID.startsWith('.')) {
|
||||||
moduleID = path.join(process.cwd(), moduleID)
|
moduleID = path.resolve(moduleID)
|
||||||
return target.apply(thisArg, [moduleID])
|
return target.apply(thisArg, [moduleID])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user