Skip to content

Commit

Permalink
fix: Skip contextConfig for getDefaults step (#226)
Browse files Browse the repository at this point in the history
* Skip getDefaults in contextConfig

* Add a debug

* skip running getDefaults if user step name is getDefaults

* update dist folder

* fix lint issue

* fix lint issue quote

* update dist folder
  • Loading branch information
ashlymat authored Nov 29, 2024
1 parent e4c841d commit 507c441
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
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/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ export function generateDefaultConfigFlags (paths: string[]): string[] {
}

export async function readContextConfig (stepName: string, flags: string[]): Promise<any> {
if (['version', 'help', 'getConfig'].includes(stepName)) {
if (['version', 'help', 'getConfig', 'getDefaults'].includes(stepName)) {
return {}
}

Expand Down
2 changes: 1 addition & 1 deletion src/piper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export async function run (): Promise<void> {

await loadPipelineEnv()
await executePiper('version')
if (onGitHubEnterprise()) {
if (onGitHubEnterprise() && actionCfg.stepName !== 'getDefaults') {
await getDefaultConfig(
actionCfg.gitHubEnterpriseServer,
actionCfg.gitHubEnterpriseApi,
Expand Down

0 comments on commit 507c441

Please sign in to comment.