Skip to content

Commit

Permalink
chore: Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
franky47 committed Apr 9, 2024
1 parent 27043ae commit d717640
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 10 deletions.
21 changes: 12 additions & 9 deletions src/action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,19 @@ function listExtraEnv(): ExtraEnv {
const extraEnv = core
.getMultilineInput('setEnv')
.map(line => line.trim())
.reduce((env, line) => {
const match = line.match(ENV_LINE_REGEX)
if (!match) {
.reduce(
(env, line) => {
const match = line.match(ENV_LINE_REGEX)
if (!match) {
return env
}
const key = match[1]!
const value = match[2]!
env[key] = value
return env
}
const key = match[1]!
const value = match[2]!
env[key] = value
return env
}, {} as Record<string, string>)
},
{} as Record<string, string>
)

if (Object.keys(extraEnv).length) {
core.info('Setting extra environment variables:')
Expand Down
8 changes: 7 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@ async function main(): Promise<void> {

// https://www.kenmuse.com/blog/avoiding-dubious-ownership-in-dev-containers/
function fixGitDubiousOwnership() {
return exec('git', ['config', '--global', '--add', 'safe.directory', '/github/workspace'])
return exec('git', [
'config',
'--global',
'--add',
'safe.directory',
'/github/workspace'
])
}

main()

0 comments on commit d717640

Please sign in to comment.