Skip to content

Commit be672d0

Browse files
authored
fix: Resolve issues with the Local Provider (#226)
1 parent f00a08f commit be672d0

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

.changeset/little-dryers-switch.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
"@codecov/bundler-plugin-core": patch
3+
"@codecov/astro-plugin": patch
4+
"@codecov/bundle-analyzer": patch
5+
"@codecov/nextjs-webpack-plugin": patch
6+
"@codecov/nuxt-plugin": patch
7+
"@codecov/remix-vite-plugin": patch
8+
"@codecov/rollup-plugin": patch
9+
"@codecov/solidstart-plugin": patch
10+
"@codecov/sveltekit-plugin": patch
11+
"@codecov/vite-plugin": patch
12+
"@codecov/webpack-plugin": patch
13+
---
14+
15+
Resolve issue with Local provider conditional check not being able to detect local values

packages/bundler-plugin-core/src/utils/providers/Local.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function _getBranch(
3737
): ProviderServiceParams["branch"] {
3838
const { args, envs } = inputs;
3939
const branch = args?.branch ?? envs?.GIT_BRANCH ?? envs?.BRANCH_NAME ?? null;
40-
if (branch !== "") {
40+
if (branch !== "" && branch !== null) {
4141
debug(`Using branch: ${branch}`, { enabled: output.debug });
4242
return branch;
4343
}
@@ -91,7 +91,7 @@ function _getSHA(
9191
): ProviderServiceParams["commit"] {
9292
const { args, envs } = inputs;
9393
const sha = args?.sha ?? envs?.GIT_COMMIT ?? null;
94-
if (sha !== "") {
94+
if (sha !== "" && sha !== null) {
9595
debug(`Using commit: ${sha}`, { enabled: output.debug });
9696
return sha;
9797
}

0 commit comments

Comments
 (0)