Skip to content

Commit

Permalink
Don't shadow vars
Browse files Browse the repository at this point in the history
  • Loading branch information
svenstaro committed Jan 3, 2023
1 parent f2c549b commit bd74772
Show file tree
Hide file tree
Showing 4 changed files with 1,740 additions and 1,648 deletions.
12 changes: 6 additions & 6 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,13 @@ function repo() {
if (!owner) {
throw new Error(`Could not extract 'owner' from 'repo_name': ${repo_name}.`);
}
const repo = repo_name.substr(repo_name.indexOf('/') + 1);
if (!repo) {
const repo_ = repo_name.substr(repo_name.indexOf('/') + 1);
if (!repo_) {
throw new Error(`Could not extract 'repo' from 'repo_name': ${repo_name}.`);
}
return {
owner,
repo
repo: repo_
};
}
function run() {
Expand All @@ -139,9 +139,9 @@ function run() {
if (file_glob) {
const files = glob.sync(file);
if (files.length > 0) {
for (const file of files) {
const asset_name = path.basename(file);
const asset_download_url = yield upload_to_release(release, file, asset_name, tag, overwrite, octokit);
for (const file_ of files) {
const asset_name = path.basename(file_);
const asset_download_url = yield upload_to_release(release, file_, asset_name, tag, overwrite, octokit);
core.setOutput('browser_download_url', asset_download_url);
}
}
Expand Down

0 comments on commit bd74772

Please sign in to comment.