Skip to content

Commit

Permalink
fix: support paring CLI args when the CLI env set in a GitHub Action
Browse files Browse the repository at this point in the history
  • Loading branch information
thewtex committed Dec 7, 2023
1 parent eb30a83 commit f511606
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions dist/cli.js

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

4 changes: 2 additions & 2 deletions 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/post.js

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

2 changes: 1 addition & 1 deletion src/core.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as coreDefault from '@actions/core'
import { coreMocked } from './mocking'

export const core = process.env.MOCKING || !process.env.GITHUB_ACTIONS ? coreMocked : coreDefault
export const core = process.env.MOCKING || process.env.CLI || !process.env.GITHUB_ACTIONS ? coreMocked : coreDefault
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ const run = async () => {
await generateInfo()
}

if (process.env.MOCKING || process.env.GITHUB_ACTIONS) {
if (process.env.MOCKING || (process.env.GITHUB_ACTIONS && !process.env.CLI)) {
run().catch((error) => {
if (core.isDebug()) {
throw error
Expand Down

0 comments on commit f511606

Please sign in to comment.