Skip to content

Commit

Permalink
fix: Resolve issues with the Local Provider (#226)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholas-codecov authored Dec 9, 2024
1 parent f00a08f commit be672d0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
15 changes: 15 additions & 0 deletions .changeset/little-dryers-switch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
"@codecov/bundler-plugin-core": patch
"@codecov/astro-plugin": patch
"@codecov/bundle-analyzer": patch
"@codecov/nextjs-webpack-plugin": patch
"@codecov/nuxt-plugin": patch
"@codecov/remix-vite-plugin": patch
"@codecov/rollup-plugin": patch
"@codecov/solidstart-plugin": patch
"@codecov/sveltekit-plugin": patch
"@codecov/vite-plugin": patch
"@codecov/webpack-plugin": patch
---

Resolve issue with Local provider conditional check not being able to detect local values
4 changes: 2 additions & 2 deletions packages/bundler-plugin-core/src/utils/providers/Local.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function _getBranch(
): ProviderServiceParams["branch"] {
const { args, envs } = inputs;
const branch = args?.branch ?? envs?.GIT_BRANCH ?? envs?.BRANCH_NAME ?? null;
if (branch !== "") {
if (branch !== "" && branch !== null) {
debug(`Using branch: ${branch}`, { enabled: output.debug });
return branch;
}
Expand Down Expand Up @@ -91,7 +91,7 @@ function _getSHA(
): ProviderServiceParams["commit"] {
const { args, envs } = inputs;
const sha = args?.sha ?? envs?.GIT_COMMIT ?? null;
if (sha !== "") {
if (sha !== "" && sha !== null) {
debug(`Using commit: ${sha}`, { enabled: output.debug });
return sha;
}
Expand Down

0 comments on commit be672d0

Please sign in to comment.