Skip to content
This repository has been archived by the owner on Sep 18, 2021. It is now read-only.

Commit

Permalink
Replace fetch with wget
Browse files Browse the repository at this point in the history
  • Loading branch information
GeopJr committed Aug 20, 2020
1 parent 108117f commit 0c3be7e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 23 deletions.
12 changes: 1 addition & 11 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.

12 changes: 1 addition & 11 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const core = require('@actions/core'),
async function dependencies() {
try {
await execute.exec('sudo', ['apt-get', 'install', '-y', 'espeak']);
await execute.exec('wget', ['-O', 'OpenDyslexic-Regular.otf', 'https://raw.githubusercontent.com/antijingoist/opendyslexic/master/compiled/OpenDyslexic-Regular.otf']);
} catch (error) {
core.setFailed(error.message);
return false;
Expand Down Expand Up @@ -101,20 +102,9 @@ async function upload(file, filename, url) {
}
}

async function downloadFont(){
try {
const result = await fetch("https://raw.githubusercontent.com/antijingoist/opendyslexic/master/compiled/OpenDyslexic-Regular.otf");
const fileStream = await fs.writeFile("OpenDyslexic-Regular.otf", result);
} catch (err) {
core.setFailed('[ERROR]:' + err.message);
return false
}
}

async function run() {
try {
await dependencies();
await downloadFont();
const token = core.getInput('token');
const octokit = github.getOctokit(token);
let tts;
Expand Down

0 comments on commit 0c3be7e

Please sign in to comment.