Skip to content

Commit cd98fd7

Browse files
authored
Merge pull request #1 from xZero707/master
Handle edge cases with PAT token ENV import
2 parents 39ab671 + 0ecc0a0 commit cd98fd7

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

index.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@ const port = 3000
66

77
const env_list = process.env
88
for(var i in env_list) {
9-
if(i.includes('PAT_')){
10-
org_pat_map[i.replace('PAT_', '')] = env_list[i]
9+
if(i.startsWith('PAT_')){
10+
const pat_label = i.replace('PAT_', '')
11+
if (pat_label) {
12+
org_pat_map[pat_label] = env_list[i].trim()
13+
}
1114
}
1215
}
1316

0 commit comments

Comments
 (0)