mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-15 06:35:20 -07:00
Wait for toml file to write
This commit is contained in:
parent
eaf500e061
commit
01e8db4a78
1 changed files with 3 additions and 4 deletions
|
|
@ -19,14 +19,13 @@ export async function downloadStorkToml () {
|
|||
// await axios( apiUrl.toString() )
|
||||
|
||||
|
||||
await axios({
|
||||
const response = await axios({
|
||||
method: "get",
|
||||
url: apiUrl.toString(),
|
||||
responseType: "stream"
|
||||
}).then(function (response) {
|
||||
response.data.pipe(fs.createWriteStream( storkTomlPath ))
|
||||
})
|
||||
|
||||
await fs.writeFile( storkTomlPath, response.data, { encoding: null })
|
||||
|
||||
// Get toml file stats
|
||||
const stats = await fs.stat( storkTomlPath )
|
||||
console.log('TOML Stats', storkTomlPath, stats)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue