File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -10,8 +10,8 @@ function getInputFromEnv(
10
10
name : string ,
11
11
options : { required ?: boolean } = { }
12
12
) : string | undefined {
13
- const value = process . env [ `INPUT_${ name . replace ( / / g, '_' ) . toUpperCase ( ) } ` ]
14
13
const { required = false } = options
14
+ const value = process . env [ `INPUT_${ name . replace ( / / g, '_' ) . toUpperCase ( ) } ` ]
15
15
if ( required && ! value ) {
16
16
throw new Error ( `Input required and not supplied: ${ name } ` )
17
17
}
Original file line number Diff line number Diff line change 1
1
import { promises as fs } from 'fs'
2
- import path from 'path'
2
+ import { basename , join } from 'path'
3
3
import { startGroup , endGroup , info } from '@actions/core'
4
4
import { getOctokit } from '@actions/github'
5
5
import { getInput } from './input'
@@ -8,9 +8,9 @@ export const run = async (): Promise<void> => {
8
8
const input = getInput ( )
9
9
10
10
const workSpace = process . env . GITHUB_WORKSPACE !
11
- const filePath = path . join ( workSpace , input . filePath )
11
+ const filePath = join ( workSpace , input . filePath )
12
12
13
- const fileName = input . gistFileName ?? path . basename ( filePath )
13
+ const fileName = input . gistFileName ?? basename ( filePath )
14
14
15
15
startGroup ( 'Dump inputs' )
16
16
info ( `\
You can’t perform that action at this time.
0 commit comments