Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MISE_TRUSTED_CONFIG_PATHS working but with a string value only #4214

Closed
jdx opened this issue Jan 24, 2025 · 2 comments
Closed

MISE_TRUSTED_CONFIG_PATHS working but with a string value only #4214

jdx opened this issue Jan 24, 2025 · 2 comments

Comments

@jdx
Copy link
Owner

jdx commented Jan 24, 2025

Discussed in #4212

Originally posted by davlgd January 24, 2025
My application is in ~/app_0f5a5bcb-cd94-488b-b54e-768cc4f036d7 which is untrusted.

To trust it, I add a setting which is not working:

[settings]
trusted_config_paths = ["~/app_0f5a5bcb-cd94-488b-b54e-768cc4f036d7"]

image

If I use the MISE_TRUSTED_CONFIG_PATHS environment variable, I face the same problem. But if y set this env var to ~/app_0f5a5bcb-cd94-488b-b54e-768cc4f036d7 (just a string, no array), it's working and I have no warning:

image

But documentation states that a string array is expected and that's what's produced by mise settings set command.

Mise doctor:

version: 2025.1.6 linux-x64 (2025-01-13)
activated: yes
shims_on_path: no

build_info:
  Target: x86_64-unknown-linux-gnu
  Features: DEFAULT, NATIVE_TLS
  Built: Mon, 13 Jan 2025 18:09:04 +0000
  Rust Version: rustc 1.84.0 (9fc6b4312 2025-01-07) (built from a source tarball)
  Profile: release

shell:
  /bin/bash
  GNU bash, version 5.2.37(1)-release (x86_64-pc-linux-gnu)
  Copyright (C) 2022 Free Software Foundation, Inc.
  License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

  This is free software; you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.

dirs:
  cache: ~/.cache/mise
  config: ~/.config/mise
  data: ~/.local/share/mise
  shims: ~/.local/share/mise/shims
  state: ~/.local/state/mise
```</div>
@roele
Copy link
Contributor

roele commented Jan 25, 2025

I use this setting for quite a long time and for me this works as expected. If i uncomment the setting i get asked to trust the files as expected.

trusted_config_paths = [
  '~/Dev',
]

As for the environment variable MISE_TRUSTED_CONFIG_PATHS the values should be colon separated e.g. export MISE_TRUSTED_CONFIG_PATHS=~/Downloads:~/Dev. The docs currently miss this information for various environment variables which are either comma or colon separated. Something to follow up on as well.

@jdx jdx closed this as completed Jan 25, 2025
@jdx
Copy link
Owner Author

jdx commented Jan 25, 2025

thanks for verifying

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants