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

Using system version in .tool-versions still sets environment variables such as GOROOT and JAVA_HOME #1549

Closed
Frederick888 opened this issue Jan 29, 2024 · 1 comment · Fixed by #1553
Labels
bug Something isn't working

Comments

@Frederick888
Copy link

Describe the bug
The environment variables point to literal system tool versions, which don't exist.

To Reproduce

$ cat .tool-versions
golang system
java system
$ command -v java
/usr/bin/java
$ echo $JAVA_HOME
/Users/frederick/.local/share/mise/installs/java/system
$ java -version
The operation couldn’t be completed. Unable to locate a Java Runtime.
Please visit http://www.java.com for information on installing Java.

$ command -v go
/usr/local/bin/go
$ echo $GOROOT
/Users/frederick/.local/share/mise/installs/go/system/go
$ go version
go: cannot find GOROOT directory: /Users/frederick/.local/share/mise/installs/go/system/go

Expected behavior
When using system version in .tool-versions, mise does not set the tool-specific environment variables.

mise doctor output

mise version:
  2024.1.30 macos-x64 (2024-01-27)

build:
  Target: x86_64-apple-darwin
  Features: DEFAULT, NATIVE_TLS
  Built: Sat, 27 Jan 2024 01:50:36 +0000
  Rust Version: rustc 1.75.0 (82e1608df 2023-12-21) (Homebrew)
  Profile: release

shell:
  /usr/local/bin/zsh
  zsh 5.9 (x86_64-apple-darwin21.3.0)

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

mise environment variables:
  MISE_SHELL=zsh

settings:
  {
    "activate_aggressive": false,
    "all_compile": false,
    "always_keep_download": false,
    "always_keep_install": false,
    "asdf_compat": false,
    "cargo_binstall": true,
    "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/frederick/.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,
    "status": {
      "missing_tools": true,
      "show_env": false,
      "show_tools": false
    },
    "task_output": null,
    "trusted_config_paths": [],
    "quiet": false,
    "verbose": false,
    "yes": false,
    "ci": false,
    "cd": null,
    "debug": false,
    "env_file": null,
    "trace": false,
    "log_level": "info"
  }

config files:

plugins:
  bun      (core)
  deno     (core)
  dhall    https://github.com/aaaaninja/asdf-dhall.git#bcf4b23
  go       (core)
  java     (core)
  node     (core)
  python   (core)
  ruby     (core)

toolset:


1 problem found:
shims are missing, run mise reshim to create them
Missing shims: wheneverize, knife, ddtracerb, multiruby, newrelic, foreman, pydoc3.8, gurl, godef, dlv, samlr, gdb_wrapper, elastic_ruby_console, rake-compiler, fission, danger, bump, mkdocs, stripe-mock-server, dhall-to-bash, yard, cucumber-html-formatter, chef-solo, python2.7, reek, maruku, rwinrm, packwerk, jenkinscli, rescue, sidekiqmon, asmfmt, npx, validate_string_sweep_files, deploy_catapult, dhall-to-nix, pip3.11, coveralls, rougify, restclient, ruby-rewrite, aws_sqs_active_job, idle, go, lessc, sdoc-merge, setup, github-markup, pydoc3, node, rbvmomish, motion, stripe-console, bundler-audit, rails-erb-lint, neovim-ruby-host, rb-sys-dock, user_agent_parser, unparser, bundle-audit, ruby_parse_extract_error, wwtd, pydoc3.11, htmldiff, safe_yaml, protoc-gen-beefcake, blade, watchmedo, gherkin-ruby, extlz4, ruby-prof-check-trace, slimrb, python3.11-config, redcarpet, cab, fillstruct, rollbar-rails-runner, zentest, y2racc, shopify, master_cut, bulk_test_account_uploader.rb, chef-apply, mongo_console, autospec, vim-flavor, newrelic_cmd, print_header.sh, mongrel_rpm, python2-config, marutex, idle3.9, geoip, dartsass, ldiff, python2.7-config, racecar, srb, pirb, rotp, mdl, yarv, python3, faker, spec, errcheck, openapi-to-dhall, python2, generate-api, haml, backburner, solargraph-runtime, term_colortab, fog, geocode, standardrb, mustache, stackprof-flamegraph.pl, gopls, slack, travis, puma, pre-commit, kramdown, 2to3-3.10, pip-sync, whenever, flay, csv-to-dhall, js-beautify, python3.10, pruby, scss, solargraph, pip3.9, easy_install-2.7, dhall-to-yaml-ng, unicorn, kill-pry-rescue, ruby-prof, patience_diff, iferr, qunit-selenium, dhall, ohai, dupfind, resque-web, jasmine, deadcode, pydoc, pip-compile, testrbl, python3.9-gdb.py, pumactl, haml-lint, pip3.8, m, thin, pronto, parallel_rspec, term_snow, testrb, commonmarker, tapioca, python3.10-gdb.py, gherkin, yardoc, rwinrmcp, rdiscount, python-config, gomodifytags, dkimsign.rb, 2to3-3.8, mixlib-install, xsd2ruby.rb, sidekiq, dhall-to-csv, voyager_cli, jekyll, python3.8, fauxhai, python3.8-gdb.py, jsonpath, que, bootsnap, proxy.rb, kurl, easy_install, premailer, guru, console, revive, idle3.10, s3-meta-sync, memcached_top, sequel, ruby-lsp, corepack, httpclient, parallel_cucumber, term_cdiff, minitest, json-to-dhall, force_clean_accounts.rb, smtpd.py, yri, term_display, python3.9, resque, launchy, nokogiri, foodcritic, pip3, erblint, rufo, cucumber, impl, parallel_spinach, zat, keyify, wsdl2ruby.rb, oauth, changelog, rackup, uuid, golangci-lint, gli, python, dhall-to-json, cap, sdoc, httparty, pydoc3.10, kwalify, byebug, python3.8-config, berks, npm, forking-test-runner, python3.9-config, github-pages, pip2.7, python3-config, tilt, idle3, resque-scheduler, racecarctl, stackprof-gprof2dot.py, tt, convert_to_should_syntax, term_mandel, gofmt, pip2, turn, rdebug-ide, r509, brakeman, dhall-docs, normalizer, mtest, idle3.11, _guard-core, wheel, resque-pool, python3.11-gdb.py, multigem, guard, unit_diff, update_rubygems, srb-rbi, gitlab, cucumber-tag-expressions, rubocop, dhall-to-yaml, gotestsum, erubis, stackprof, sprockets, countloc, python3.10-config, reminder, yaml-to-dhall, stree, sass, r509-parse, agrep, racc2y, serverspec-init, rbprettier, thor, rspec, sass-convert, gotags, goimports, chef-zero, socksify_ruby, shoryuken, minitest_bisect, aruba, dhall-to-toml, rbtrace, pip, parallel_test, tailwindcss, code_owners, 2to3, ruby_parse, pry-remote, blackd, html_tokenizer, ffi-yajl-bench, spoom, toml-to-dhall, term_decolor, editorconfig, rrule, setupkindlerb, aws-v3.rb, private_gem, unicorn_rails, dhall-lsp-server, coderay, spring, listen, chef-shell, dotenv, knapsack, fasterer, apps_approval, ruby-parse, pyproject-build, idle3.8, 2to3-3.11, markdown_py, rumoji, jmespath.rb, kitchen, slim-lint, code_climate_reek, rails, nrdebug, black, python2.7-gdb.py, pry, gemoji, 2to3-3.9, reverse_markdown, pydoc3.9, pathspec-rb, chef-client, ghp-import, gorename, sneakers, pip3.10, pygmentize, staticcheck, python3.11, statsd-to-stdout

Additional context
May be relevant: #278 #1248

@Frederick888 Frederick888 added the bug Something isn't working label Jan 29, 2024
@jdx
Copy link
Owner

jdx commented Jan 29, 2024

I think this is the second time this has regressed, will be useful to put an e2e test around it

jdx added a commit that referenced this issue Jan 29, 2024
jdx added a commit that referenced this issue Jan 29, 2024
@jdx jdx closed this as completed in #1553 Jan 29, 2024
jdx added a commit that referenced this issue Jan 29, 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.

2 participants