fix: insecure tmp path (#33)

Fixes #13
This commit is contained in:
Morten Olsen
2024-01-14 13:00:17 +01:00
committed by GitHub
parent 7436b3439c
commit 028b65587e
5 changed files with 15 additions and 5 deletions

View File

@@ -4,6 +4,7 @@ import { run as runLoad } from '@morten-olsen/mini-loader-runner';
import { bundle } from '../../bundler/bundler.js';
import { step } from '../../utils/step.js';
import { readSecrets } from './local.utils.js';
import { Config } from '../../config/config.js';
const run = new Command('run');
@@ -12,6 +13,7 @@ run
.argument('script')
.action(async (script) => {
const location = resolve(script);
const config = new Config();
const { autoInstall } = run.opts();
const secrets = await readSecrets();
@@ -21,6 +23,7 @@ run
const { promise, emitter } = await runLoad({
script: code,
secrets,
cacheLocation: config.cacheLocation,
});
emitter.addListener('message', (message) => {
switch (message.type) {