Prevent overwriting existing toml file

This commit is contained in:
Sam Carlton 2022-05-17 15:33:07 -05:00
parent 93af987329
commit 9bc45ffc5a

View file

@ -10,6 +10,12 @@ import {
} from '~/helpers/stork/config.js'
export async function downloadStorkToml () {
// Check if the toml file exists
if (fs.existsSync(storkTomlPath)) {
console.log(`Stork toml file already exists at ${storkTomlPath}`)
return
}
const apiUrl = new URL( process.env.PUBLIC_API_DOMAIN )
apiUrl.pathname = storkTomlPath.replace('static/', '')