Replies: 3 comments 3 replies
-
|
You can trust certain directories by default with Example: trusted_config_paths = ["~/.config/mise", "~/work"] |
Beta Was this translation helpful? Give feedback.
-
|
Per this reply on discord, the hanging can be worked around by passing both commands through $ mise x -- zig build
$ mise x -- sudo env "PATH=$PATH" zig build installnoconf...In addition to that, trusting our regular user's mise config for root is still required as well: # /root/.config/mise/config.toml:
[settings]
trusted_config_paths=["/home/laur89/.config/mise/config.toml"]This solves the immediate issue for me, but it's still unclear as to why none of it is required when executing the script in a shell that has done |
Beta Was this translation helpful? Give feedback.
-
|
Well there are some differences how activate and shims operate. Maybe you find some answers at https://mise.jdx.dev/dev-tools/shims.html#shims-vs-path. Besides that mise operates mainly in user space to prevent permission issues. So installing tools with root and executing them with another user is guaranteed to cause issues. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a bash bootstrap script that is executed on a fresh debian installation that does most of the system setup. Among other things, it pulls config files, installs mise, installs mise-managed tools, and then uses said tools to build & install other programs.
One such tool is
zig, and a program it builds & installs is ly display manager.In short, this is roughly what happens:
Last command prompts me:
Couple of problems with it:
/home/laur89. or is it referring to /home/laur89/.config/mise... ?Yeshangs the execution. no errors, no nothing.How to proceed? The logic needs to be modified so that sudo can use the mise-managed zig.
Note on my current system that's been live for a few years, when the bootstrap script is executed from a shell that executes
eval -- "$(mise activate bash)"(i.e. without --shim) from ~/.bashrc:Beta Was this translation helpful? Give feedback.
All reactions