fix: overwrite MISE_LOG_LEVEL when in debug mode (#138)

As the log_level parameter defaults to info the MISE_LOG_LEVEL
environment variable needs to be overriden or otherwise it is not set.
This also means that mise-action will always run with debug logging when
it is ran with debugging enabled, no matter what log level the user has
set.
This commit is contained in:
Maximilian Remming 2024-10-29 14:08:34 +02:00 committed by GitHub
parent 12823cc980
commit fb230aa558
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

2
dist/index.js generated vendored
View file

@ -62585,7 +62585,7 @@ const mise = async (args) => core.group(`Running mise ${args.join(' ')}`, async
core.getInput('install_dir') || core.getInput('install_dir') ||
process.cwd(); process.cwd();
const env = core.isDebug() const env = core.isDebug()
? { MISE_LOG_LEVEL: 'debug', ...process.env } ? { ...process.env, MISE_LOG_LEVEL: 'debug' }
: undefined; : undefined;
if (args.length === 1) { if (args.length === 1) {
return exec.exec(`mise ${args}`, [], { return exec.exec(`mise ${args}`, [], {

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

View file

@ -181,7 +181,7 @@ const mise = async (args: string[]): Promise<number> =>
core.getInput('install_dir') || core.getInput('install_dir') ||
process.cwd() process.cwd()
const env = core.isDebug() const env = core.isDebug()
? { MISE_LOG_LEVEL: 'debug', ...process.env } ? { ...process.env, MISE_LOG_LEVEL: 'debug' }
: undefined : undefined
if (args.length === 1) { if (args.length === 1) {