Yasunori Fujie
7e1f2a0d93
fix: wait until the plugin update are finished ( #1037 )
2021-09-14 09:44:53 -04:00
Filip Chabik
47e8fb051b
fix: sed re error trailing backslash on FreeBSD ( #1046 ). ( #1047 )
2021-09-13 09:16:13 -04:00
Yasunori Fujie
30d27cbe6b
fix: incorrect usage of grep ( #1035 )
2021-09-02 15:57:30 -04:00
Jonathan Morley
8490526546
fix: full_version_name is not available here ( #1031 )
2021-08-27 17:54:47 -04:00
James Hegedus
a3ba5a794c
feat: toggle off repo sync completely ( #1011 )
2021-08-04 08:41:19 +10:00
James Hegedus
7697e6e344
fix: regex validate plugin names on plugin add cmd ( #1010 )
2021-07-30 08:49:01 +10:00
Trevor Brown
2ad0f5ea45
fix: allow plugin callbacks to be in any language ( #995 )
2021-07-30 08:44:14 +10:00
James Hegedus
cd0a6a779e
feat: display plugin repo refs alongside urls in info cmd ( #1014 )
2021-07-27 08:57:13 +10:00
Mark Yen
39c9999519
fix: ensure shims get created when data dir has spaces ( #996 )
2021-07-20 14:21:39 +10:00
James Hegedus
60e0e05a9f
ci: automated release workflow ( #987 )
...
Co-authored-by: jthegedus <jthegedus@users.noreply.github.com>
2021-07-13 11:32:37 +10:00
Alberto de Murga
664d82ed8a
feat: asdf latest defer to plugin to determine the latest version ( #938 )
...
Co-authored-by: James Hegedus <jthegedus@hey.com>
2021-07-07 12:51:19 +10:00
Kevin Lane
5cf8f8962f
fix: support latest with filter on local and global ( #633 )
...
Co-authored-by: Thomas B Homburg <thomas@homburg.dk>
Co-authored-by: James Hegedus <jthegedus@hey.com>
2021-07-06 21:17:00 +10:00
Neo Hsu
1716afa021
feat: configurable plugin repo last check time ( #957 )
...
Co-authored-by: James Hegedus <jthegedus@hey.com>
2021-06-02 14:22:27 +10:00
Trevor Brown
0f508418e4
Address shellcheck and shfmt warnings
2021-05-24 18:09:35 -04:00
Trevor Brown
4dbe88a62a
Remove process substitution from command-list-all.bash file
2021-05-24 17:06:17 -04:00
Trevor Brown
f125741fb5
Update code to use . instead of source
2021-05-21 12:03:06 -04:00
Trevor Brown
156a82cc49
Merge pull request #863 from asdf-vm/ban-process-substitution
...
Ban process substitution from asdf codebase
2021-05-20 08:44:58 -04:00
Matt
a7d3661f6c
fix: insert error handling in list-all & download plugin scripts ( #881 )
2021-05-19 19:51:45 +10:00
James Hegedus
b9228a26de
fix: remove find -print0
2021-05-19 19:43:16 +10:00
James Hegedus
26d2c64477
fix: pipe find into while
2021-05-19 19:01:36 +10:00
James Hegedus
10d9c1218e
Merge branch 'master' into ban-process-substitution
2021-04-27 19:34:35 +10:00
jthegedus
43d6fef000
fix: format command-reshim
2021-04-27 19:31:22 +10:00
jthegedus
0c263ad700
fix: typo and refactor on top of master
2021-04-27 19:28:57 +10:00
jthegedus
ade70b94db
chore: sync master
2021-04-27 19:28:24 +10:00
jthegedus
6af66dc88c
fix: shellcheck errors and typo
2021-04-27 18:04:28 +10:00
James Hegedus
d7b62d2e92
fix: plugin update portability ( #924 )
2021-04-18 15:03:00 +10:00
James Hegedus
456d8e36ca
fix: <plugin update all> to latest commit on default branch for each plugin ( #800 )
2021-03-02 17:37:05 +11:00
Trevor Brown
f633811577
Ban process substitution from asdf codebase
2021-02-05 11:28:27 -05:00
Nanda Lopes
dc776c0bc0
Fix find global options warning
...
find: warning: you have specified the global option -mindepth after the argument
-type, but global options are not positional, i.e., -mindepth affects tests
specified before it as well as those specified after it. Please specify global
options before other arguments.
find: warning: you have specified the global option -maxdepth after the argument
-type, but global options are not positional, i.e., -maxdepth affects tests
specified before it as well as those specified after it. Please specify global
options before other arguments.
2021-01-19 11:14:26 -03:00
Jean-Paul Bonnetouche
0de6910d1f
fix: shims break when POSIXLY_CORRECT=1
...
Process substitution isn't specified by POSIX and makes shims break when called by a script that `export POSIXLY_CORRECT=1` (like gitflow [here](https://github.com/nvie/gitflow/blob/develop/git-flow#L78 )).
Here we replace `grep -f <(cmd1) <(cmd2)` with `cmd2 | grep -F "$(cmd1)"` so that we can provide a string instead of a file descriptor and get the same result as before.
(Note: We also check if the result of `cmd1` is empty before running `grep` to get the same behavior as with `-f`. This also prevent crashes if null results are piped to `xargs` and fits nicely with the `with_shim_executable` function that already check the result of `$selected_version` before going on).
Fixes : #581
2021-01-14 13:19:27 +01:00
Aaron Jensen
d2b7e2fceb
Update no plugin installed error message ( #818 )
2020-12-21 11:00:09 +11:00
Trevor Brown
34593c1766
Fix resolution of relative symlinks
...
Fixes #366 , #625
2020-10-08 10:17:01 -04:00
Trevor Brown
ebc52b150b
Merge branch 'master' into parallelize-plugin-updates
2020-09-28 12:16:06 -04:00
Trevor Brown
8bbefba072
chore: ban echo command ( #806 )
2020-09-22 08:27:52 +10:00
Jochen Schalanda
0edb50547c
feat: support for "latest" in shell, local, and global ( #802 )
2020-09-19 15:37:52 +10:00
Trevor Brown
d93a2b6fe1
Fix syntax for plugin update loop
2020-09-18 11:41:56 -04:00
Joel Parker Henderson
0efc04bca5
Fix plugin-update --all when there are no plugins
...
Issue: when asdf is first installed, there are no plugins, and running `asdf plugin-update --all` crashes because the plugin directory doesn't exist; similarly, the command crashes if the plugins directory exists yet doesn't contain any subdirectories.
Solution: This patch changes the directory loop from using a wildcard `plugins/*` to a more robust approach: first verify the plugins directory exists, then use the`find` command to list subdirectories and correctly handle the corner case of no subdirectories.
Future: Consider printing an error message and/or advice message. Consider automatically creating the plugins directory as needed. Consider prompting the user to install some popular plugins.
2020-09-16 21:00:35 -07:00
James Hegedus
b178cb07a7
fix: rm asdf current header row for now ( #793 )
2020-09-02 09:11:07 +10:00
Timo Sand
d27b3661a9
Fixes linter issues
2020-09-01 23:27:56 +02:00
Timo Sand
cd4c1c5748
Changes to use function to update plugin
...
Enables us to add parallelization
2020-09-01 23:27:56 +02:00
James Hegedus
e9c149ea21
fix: incorrect version output in asdf current ( #746 )
2020-08-29 09:09:22 +10:00
Daniel Perez
77a748d70a
fix: _where_ bug when multiple versions are selected ( #790 )
...
Fixes #690
2020-08-28 19:24:59 +10:00
James Hegedus
8ca2af3316
feat: cmd to print debug information ( #787 )
2020-08-24 10:55:41 +10:00
samontea
b6deb141b5
fix: typo causing plugin-test to erroneously fail
2020-08-17 15:38:36 -07:00
Daniel Perez
1a01356935
fix: plugin test to emit error message when latest
fails ( #772 )
...
Fix #756
2020-08-10 13:27:35 +10:00
Trevor Brown
cc0023b022
feat: plugin documentation callback support 🎉 ( #757 )
2020-07-31 18:47:18 +10:00
James Hegedus
a5c815b6d4
fix: print tool-versions file dir on shim error ( #750 )
2020-07-31 18:46:33 +10:00
Dan Fuchs
6a1855e26f
Install one tool specified in .tool-versions
...
`asdf install <name>` installs that single tool at the version specified
in `.tool-versions`. If there is no `.tool-versions` or if that tool is
not in it, an error message is shown and `asdf` exits `1`.
Implements #759
2020-07-09 18:16:50 -05:00
James Hegedus
50feef2a77
fix: CI formatting use editorconfig ( #751 )
2020-06-30 09:16:35 +10:00
Thomas B Homburg
1b7b4da0a6
fix: remove column
command in favor of awk ( #721 )
2020-06-17 08:26:46 +10:00
Alexandre ZANNI
f5c7dae331
fix: asdf shell command docs & help output ( #737 )
...
Co-authored-by: James Hegedus <james@jthegedus.com>
2020-06-13 10:43:52 +10:00
James Hegedus
0f80ac3567
fix: remove sort --version-sort from command-latest as list is already sorted ( #700 )
2020-06-09 09:24:41 +10:00
Aravinda Rao
fe26274f38
Ensure consistency in indentation for message shown when no versions installed
2020-05-18 21:48:27 +05:30
Trevor Brown
410f414529
Remove downloads when removing a plugin
2020-05-14 09:13:51 -04:00
Trevor Brown
2a058af9eb
Merge branch 'master' into tb/keep-source
2020-05-08 10:21:59 -04:00
Trevor Brown
f28c518dc7
Address shellcheck warnings
2020-05-05 08:57:42 -04:00
Trevor Brown
309a4f1a12
Don't delete the download directory if the --keep-download flag is passed or the always_keep_download config is set to yes
2020-05-04 15:05:10 -04:00
Trevor Brown
a886303065
Remove duplicate mkdir calls in install_tool_version function
2020-05-04 10:51:07 -04:00
Trevor Brown
c4c022454f
Revert "Change exit code to 0 and output message to stdout"
...
This reverts commit e48ed1c228
.
2020-03-31 09:09:52 -04:00
Paulo Renato
e48ed1c228
Change exit code to 0 and output message to stdout
2020-03-30 16:06:12 -03:00
Jochen Schalanda
3c3f0e67f6
Rename custom plugin-add/plugin-remove for plugins ( #684 )
...
Rename custom scripts for `plugin-add` and `plugin-remove` phases in plugins to make clear when they are executed:
`plugin-add` -> `post-plugin-add`
`plugin-remove` -> `pre-plugin-remove`
2020-03-22 12:57:54 +11:00
Jochen Schalanda
57186be6d9
Support customizing plugin-add and plugin-remove
...
* Add support for custom `plugin-add` and `plugin-remove` in plugins
* Add configurable command hooks for plugin installation and removal
```shell
pre_asdf_plugin_remove = echo will remove plugin ${1}
pre_asdf_plugin_remove_foo = echo will remove plugin foo
post_asdf_plugin_remove = echo removed plugin ${1}
post_asdf_plugin_remove_foo = echo removed plugin foo
```
Closes #670
2020-03-21 14:59:33 +01:00
Victor Hugo Borja
a26bed6586
Make sure extension commands are properly displayed by asdf help
2020-03-15 11:45:09 -06:00
Jochen Schalanda
609e41e276
Use different exit code if updates are disabled
...
If asdf-vm was installed with a package manager and the user doesn't
have the necessary permissions to update it with `asdf update`, asdf-vm
emits an informational message and exits with exit code 1.
This makes it hard to programmatically detect whether the update failed
or wasn't even attempted because it's not possible.
With this change, asdf-vm would exit with the exit code 42 if updates are
disabled instead of exit code 1, which signals an error during update.
Refs r-darwish/topgrade#367
2020-03-13 10:14:28 +01:00
Pablo Lalloni
4ee4c1431c
Default to empty version to avoid error on strict mode bash
2020-03-07 09:26:16 -03:00
Trevor Brown
ac62c7c4d4
Invoke the plugin's download script before invoking the plugin's install script
2020-03-06 19:15:06 -05:00
Trevor Brown
91a2a1f7be
Add get_download_path function
2020-03-06 18:54:33 -05:00
Trevor Brown
52cbf1165c
Add .bash file extensions to files containing code executed by Bash
2020-03-02 12:48:05 -05:00
Victor Borja
543e16ef5b
Merge pull request #657 from asdf-vm/fix/consistent-use-pluginname
...
fix: consistent use of plugin_name
2020-02-14 14:36:23 -06:00
Victor Borja
62c4fdb163
Merge pull request #623 from jonmast/prevent-exec-recursion
...
Ignore shim directory for executable lookups
2020-02-14 14:26:03 -06:00
James Hegedus
c69ed91886
fix: consistent use of plugin_name
...
All other instances of `check_if_plugin_exists` pass the value as `plugin_name`. Minor fix for consistency.
2020-02-14 17:21:58 +11:00
Trevor Brown
43bd2d2cb5
Address linting errors
2020-02-07 22:51:03 -05:00
Trevor Brown
c0222b0b4e
Add back in support for path versions in shim code
2020-02-07 22:50:21 -05:00
Trevor Brown
e4ddf560e8
Move function definitions out of with_shim_executable function
2020-02-07 22:32:04 -05:00
Trevor Brown
e79016add3
Merge pull request #630 from lalloni/default-to-empty-asdf-data-dir
...
Defaults to empty ASDF_DATA_DIR
2020-02-06 07:15:07 -05:00
Trevor Brown
e4a9ad6e58
Merge pull request #649 from asdf-vm/tb/misc-test-improvements
...
Misc. Test Improvements
2020-02-05 07:51:42 -05:00
Trevor Brown
1dc939bb52
Simplify asdf_data_dir function
2020-02-05 07:47:02 -05:00
Trevor Brown
f787b719ac
Merge pull request #640 from asdf-vm/improve-export-shell
...
Fix asdf shell xx --unset for fish
2020-02-04 08:17:54 -05:00
Trevor Brown
a6b8996f2a
Address shellcheck warnings
2020-01-29 08:04:39 -05:00
Daniel Perez
e53de6726f
Fix asdf shell xx --unset for fish
2020-01-25 20:42:43 +00:00
Pablo Lalloni
95e0f534e6
Defaults to empty ASDF_DATA_DIR
...
If ASDF_DATA_DIR variable is undefined it will assign an empty value to
it so bash instances running with set -o nounset can run the script
without error.
2019-12-31 09:58:05 -03:00
Jonathan Mast
069c74f45e
Ignore shim directory for executable lookups
...
Previously, the shims directory was only excluded for system versions,
which meant that `asdf exec` would fall back to a shim if the install
didn't have the desired binary. If the shims are up to date this isn't a
problem since we check the metadata, but it causes issues if those are
out of sync for whatever reason.
I've checked all the uses of this function and I'm not seeing anywhere
we should need the old behavior.
2019-12-21 15:24:55 -05:00
Luke Bonaccorsi
c728018627
Fix issue with preset version warning assuming that the shim name and plugin name are the same
2019-12-20 17:26:00 +00:00
Victor Borja
ff57001691
Merge pull request #609 from tejanium/clearer-warning
...
Clarify instructions when <version> of a <shim_name> is missing.
2019-12-13 12:02:16 -06:00
Teja Sophista
026aa78f35
Output different warning for empty and missing version
...
1. when `.tool-versions` is not set
2. when `.tool-versions` set version that is not installed
2019-12-04 14:18:58 +00:00
Victor Hugo Borja
5ab01f49df
Allow eval only on asdf function at lib/asdf.sh.
...
It's needed for `asdf shell` command.
2019-12-03 11:04:04 -06:00
Teja Sophista
c9014666e2
Clarify instructions when <version> of a <shim_name> is missing.
2019-12-03 14:21:31 +00:00
Timo Sand
d76f639c75
Fix shell compatibility with ZSH
...
`command eval` does not work in ZSH
2019-12-01 20:41:28 +01:00
Victor Hugo Borja
04b61ae62c
Support latest:<version>
on plugin-test
2019-11-30 15:13:41 -06:00
Victor Hugo Borja
c986bc9726
Fix plugin update command to check for at least one arg
2019-11-30 15:03:30 -06:00
Victor Hugo Borja
3d3595c7a3
Improvements to asdf plugin
commands.
2019-11-30 14:18:37 -06:00
Victor Hugo Borja
1d48d8dbfb
Dont use pull on command-update
2019-11-29 10:42:22 -06:00
Victor Hugo Borja
f0bdbe1d89
fix shellcheck on command-help
2019-11-29 10:20:03 -06:00
Victor Hugo Borja
b8dc5f1604
Run shfmt on bash files
2019-11-29 10:15:38 -06:00
Victor Hugo Borja
3f0fe57db9
Let asdf help show plugin commands when available.
...
Also fix `asdf list all` to work as subcommand. Fixes #602
2019-11-29 07:42:55 -06:00
Victor Hugo Borja
1be6614aa7
Add shellcheck source comments
2019-11-27 12:29:04 -06:00
Victor Hugo Borja
e968fe6142
Subcommand-aware command line interface.
2019-11-27 12:17:17 -06:00
Victor Hugo Borja
4939e24c90
Make asdf plugin test
determine plugin version with asdf latest
...
Fixes #541
2019-11-26 22:23:27 -06:00
Victor Hugo Borja
2ea3d2017f
asdf --version
shows git-revision when asdf_dir is a git clone.
...
This will help people running on asdf master be able to report
issues and maintainers can know the precise git commit where the
error was reported.
See #589
2019-11-26 22:08:45 -06:00
Victor Borja
4279549530
Merge pull request #583 from android10/master
...
asdf_data_dir() returning incorrect path when running as root.
2019-11-25 12:23:17 -06:00