File tree Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -9301,11 +9301,15 @@ function callAsyncFunction(args, source) {
9301
9301
// EXTERNAL MODULE: external "fs"
9302
9302
var external_fs_ = __webpack_require__(747);
9303
9303
9304
+ // EXTERNAL MODULE: external "path"
9305
+ var external_path_ = __webpack_require__(622);
9306
+
9304
9307
// CONCATENATED MODULE: ./src/main.ts
9305
9308
9306
9309
9307
9310
9308
9311
9312
+
9309
9313
process.on('unhandledRejection', handleError);
9310
9314
main().catch(handleError);
9311
9315
async function main() {
@@ -9331,9 +9335,12 @@ async function main() {
9331
9335
Object(core.debug)(__dirname);
9332
9336
Object(core.debug)(__filename);
9333
9337
Object(core.debug)('-------');
9334
- if (Object(external_fs_.existsSync)(file)) {
9338
+ // @ts-ignore
9339
+ const filePath = Object(external_path_.join)(process.env.GITHUB_WORKSPACE, file);
9340
+ Object(core.debug)(filePath);
9341
+ if (Object(external_fs_.existsSync)(filePath)) {
9335
9342
Object(core.debug)('Inside try block');
9336
- script = Object(external_fs_.readFileSync)(file , 'utf-8');
9343
+ script = Object(external_fs_.readFileSync)(filePath , 'utf-8');
9337
9344
}
9338
9345
Object(core.debug)(script);
9339
9346
// Using property/value shorthand on `require` (e.g. `{require}`) causes compilatin errors.
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import * as core from '@actions/core'
2
2
import { context , GitHub } from '@actions/github'
3
3
import { callAsyncFunction } from './async-function'
4
4
import { existsSync , readFileSync } from 'fs'
5
+ import { join } from 'path'
5
6
6
7
process . on ( 'unhandledRejection' , handleError )
7
8
main ( ) . catch ( handleError )
@@ -29,9 +30,12 @@ async function main() {
29
30
core . debug ( __filename )
30
31
core . debug ( '-------' )
31
32
32
- if ( existsSync ( file ) ) {
33
+ // @ts -ignore
34
+ const filePath = join ( process . env . GITHUB_WORKSPACE , file )
35
+ core . debug ( filePath )
36
+ if ( existsSync ( filePath ) ) {
33
37
core . debug ( 'Inside try block' ) ;
34
- script = readFileSync ( file , 'utf-8' )
38
+ script = readFileSync ( filePath , 'utf-8' )
35
39
}
36
40
37
41
core . debug ( script ) ;
You can’t perform that action at this time.
0 commit comments