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

deleting a setting attempts to remove it from config.toml instead of settings.toml #1436

Closed
Fiveside opened this issue Jan 11, 2024 · 0 comments · Fixed by #1439
Closed

deleting a setting attempts to remove it from config.toml instead of settings.toml #1436

Fiveside opened this issue Jan 11, 2024 · 0 comments · Fixed by #1439
Labels
bug Something isn't working

Comments

@Fiveside
Copy link

Describe the bug
If I attempt to remove the verbosity configuration via mise settings unset verbose, I get an error indicating that it is still looking for the setting in config.toml:

Error:   × failed read_to_string: ~/.config/mise/config.toml
  ╰─▶ No such file or directory (os error 2)

To Reproduce

  1. run mise settings set verbose true
  2. run mise settings unset verbose

Expected behavior
I expect the setting to be removed from the settings.toml file.

mise doctor output

[DEBUG] ARGS: mise/target/release/mise doctor
[DEBUG] Config {
    Config Files: [
        "~/.tool-versions",
    ],
    Installed Plugins: [
        "dotnet",
        "helm",
        "kubectl",
        "terraform",
    ],
}
mise version:
  2024.1.16 macos-x64 (a2e8af1 2024-01-11)

build:
  Target: x86_64-apple-darwin
  Features: DEFAULT, NATIVE_TLS
  Built: Thu, 11 Jan 2024 05:17:35 +0000
  Rust Version: rustc 1.75.0 (82e1608df 2023-12-21)
  Profile: release

[DEBUG] $ /usr/local/bin/fish --version
shell:
  /usr/local/bin/fish
  fish, version 3.7.0

mise data directory:
  /Users/erich/.local/share/mise

mise environment variables:
  MISE_SHELL=fish

mise settings file:
  ~/.config/mise/settings.toml

settings:
  {
    "all_compile": false,
    "always_keep_download": false,
    "always_keep_install": false,
    "asdf_compat": false,
    "color": true,
    "disable_default_shorthands": false,
    "disable_tools": [],
    "experimental": false,
    "jobs": 4,
    "legacy_version_file": true,
    "legacy_version_file_disable_tools": [],
    "node_compile": false,
    "not_found_auto_install": true,
    "paranoid": false,
    "plugin_autoupdate_last_check_duration": "7d",
    "python_compile": false,
    "python_default_packages_file": "/Users/erich/.default-python-packages",
    "python_patch_url": null,
    "python_precompiled_os": null,
    "python_patches_directory": null,
    "python_precompiled_arch": null,
    "python_pyenv_repo": "https://github.com/pyenv/pyenv.git",
    "python_venv_auto_create": false,
    "raw": false,
    "shorthands_file": null,
    "task_output": null,
    "trusted_config_paths": [],
    "quiet": false,
    "verbose": true,
    "yes": false,
    "ci": false,
    "cd": null,
    "debug": false,
    "env_file": null,
    "trace": false,
    "log_level": "debug"
  }

config files:
  ~/.tool-versions

[DEBUG] $ git -C /Users/erich/.local/share/mise/plugins/dotnet -c safe.directory=/Users/erich/.local/share/mise/plugins/dotnet config --get remote.origin.url
[DEBUG] remote url for /Users/erich/.local/share/mise/plugins/dotnet: https://github.com/hensou/asdf-dotnet
[DEBUG] $ git -C /Users/erich/.local/share/mise/plugins/dotnet -c safe.directory=/Users/erich/.local/share/mise/plugins/dotnet rev-parse --short HEAD
[DEBUG] current sha for /Users/erich/.local/share/mise/plugins/dotnet: ebe399c
[DEBUG] $ git -C /Users/erich/.local/share/mise/plugins/helm -c safe.directory=/Users/erich/.local/share/mise/plugins/helm config --get remote.origin.url
[DEBUG] remote url for /Users/erich/.local/share/mise/plugins/helm: https://github.com/Antiarchitect/asdf-helm.git
[DEBUG] $ git -C /Users/erich/.local/share/mise/plugins/helm -c safe.directory=/Users/erich/.local/share/mise/plugins/helm rev-parse --short HEAD
[DEBUG] current sha for /Users/erich/.local/share/mise/plugins/helm: a39e17b
[DEBUG] $ git -C /Users/erich/.local/share/mise/plugins/kubectl -c safe.directory=/Users/erich/.local/share/mise/plugins/kubectl config --get remote.origin.url
[DEBUG] remote url for /Users/erich/.local/share/mise/plugins/kubectl: https://github.com/asdf-community/asdf-kubectl.git
[DEBUG] $ git -C /Users/erich/.local/share/mise/plugins/kubectl -c safe.directory=/Users/erich/.local/share/mise/plugins/kubectl rev-parse --short HEAD
[DEBUG] current sha for /Users/erich/.local/share/mise/plugins/kubectl: cbe6df4
[DEBUG] $ git -C /Users/erich/.local/share/mise/plugins/terraform -c safe.directory=/Users/erich/.local/share/mise/plugins/terraform config --get remote.origin.url
[DEBUG] remote url for /Users/erich/.local/share/mise/plugins/terraform: https://github.com/asdf-community/asdf-hashicorp.git
[DEBUG] $ git -C /Users/erich/.local/share/mise/plugins/terraform -c safe.directory=/Users/erich/.local/share/mise/plugins/terraform rev-parse --short HEAD
[DEBUG] current sha for /Users/erich/.local/share/mise/plugins/terraform: 197e3ec
plugins:
  bun         (core)
  deno        (core)
  dotnet      https://github.com/hensou/asdf-dotnet#ebe399c
  go          (core)
  helm        https://github.com/Antiarchitect/asdf-helm.git#a39e17b
  java        (core)
  kubectl     https://github.com/asdf-community/asdf-kubectl.git#cbe6df4
  node        (core)
  python      (core)
  ruby        (core)
  terraform   https://github.com/asdf-community/asdf-hashicorp.git#197e3ec

[DEBUG] Toolset: helm@2.12.1, python@system, ruby@system, node@system, kubectl@1.20.4, terraform@0.14.11
toolset:
  helm@2.12.1, python@system, ruby@system, node@system, kubectl@1.20.4, terraform@0.14.11

No problems found
[DEBUG] ARGS: /usr/local/opt/mise/bin/mise hook-env -s fish
[DEBUG] Config {
    Config Files: [
        "~/.tool-versions",
    ],
    Installed Plugins: [
        "dotnet",
        "helm",
        "kubectl",
        "terraform",
    ],
}

Additional context
I originally encountered this problem on the version distributed by homebrew. Then I cloned the mise repo and was able to replicate the failure on a fresh compile from main. This was on macOS Sonoma 14.2.1.

@Fiveside Fiveside added the bug Something isn't working label Jan 11, 2024
@jdx jdx closed this as completed in #1439 Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant