Skip to content
Snippets Groups Projects
Commit e7282d81 authored by bmckitrick's avatar bmckitrick
Browse files

chore: enable / support rtx for backwards compatibility

parent ab857cd0
No related branches found
No related tags found
No related merge requests found
Pipeline #21078492 passed
Loading
Loading
@@ -114,7 +114,7 @@ If you're running on MacOS, the recommended approach is to use Homebrew:
brew install mise
```
 
Linux users should follow the instructions for their package manager in [the mise documentation](https://github.com/jdx/mise#apt).
Linux users should follow the instructions for their package manager in [the mise documentation](https://mise.jdx.dev/getting-started.html#apt).
 
#### Step 3.3: Hook `mise` into your shell
 
Loading
Loading
Loading
Loading
@@ -60,7 +60,7 @@ setup_mise() {
 
do_mise_install() {
cat "$temp_MISE_SHORTHANDS_FILE"
MISE_SHORTHANDS_FILE=$temp_MISE_SHORTHANDS_FILE mise install
MISE_SHORTHANDS_FILE=$temp_MISE_SHORTHANDS_FILE $MISE_COMMAND install
rm -f "$temp_MISE_SHORTHANDS_FILE"
}
 
Loading
Loading
@@ -71,7 +71,7 @@ setup_mise() {
# No source? mise defaults should suffice.
if [[ -z $source ]]; then return; fi
 
# See https://github.com/jdxcode/mise#mise_shorthands_fileconfigmiseshorthandstoml
# See https://mise.jdx.dev/configuration.html#mise-shorthands-file-config-mise-shorthands-toml
echo "$plugin = \"$source\"" >>"$temp_MISE_SHORTHANDS_FILE"
}
 
Loading
Loading
@@ -79,12 +79,12 @@ setup_mise() {
local plugin=$1
local source=$2
 
if ! mise plugin list --urls | grep -qF "${source}"; then
if ! $MISE_COMMAND plugin list --urls | grep -qF "${source}"; then
return
fi
 
echo "# Removing plugin ${plugin} installed from ${source}"
mise plugin remove "${plugin}" || {
$1 plugin remove "${plugin}" || {
echo "Failed to remove plugin: ${plugin}"
exit 1
} >&2
Loading
Loading
@@ -92,6 +92,12 @@ setup_mise() {
}
 
if command -v mise >/dev/null; then
MISE_COMMAND=$(which mise)
export MISE_COMMAND
setup_mise
elif command -v rtx >/dev/null; then
MISE_COMMAND=$(which rtx)
export MISE_COMMAND
setup_mise
elif [[ -n ${ASDF_DIR-} ]]; then
setup_asdf
Loading
Loading
Loading
Loading
@@ -22,8 +22,7 @@ warn() {
if command -v mise >/dev/null; then
echo >&2 -e "mise installed..."
elif (command -v rtx >/dev/null); then
echo >&2 -e "🚫 2024-01-02: 'rtx' has changed to 'mise' ; upgrade (including shell hooks) and run again"
exit 1
echo >&2 -e "⚠️ 2024-01-02: 'rtx' has changed to 'mise' ; please upgrade before rtx is deprecated"
elif [[ -n ${ASDF_DIR-} ]]; then
warn "asdf installed, but deprecated. Consider switching over to mise."
else
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment